jQuery Mobile reads
data- attributes once when each widget is initialized. Changes made to
data- attributes after initialization are ignored.
Depending on the widget, JQM uses the data- attributes to set some internal state, to affect the generation of HTML markup which it inserts into the document, to add some CSS class or classes to the widget element or some element inside of the widget, etc.
Again depending on the widget, you can usually effect the equivalent change after initialization by (in some cases) simply adding/removing the corresponding CSS class, or making a call to an API method. I'd encourage you to pursue the API documentation, because there is no general rule you can follow. So, look it up.
In this case, you would use the dismissible function of the panel: