So jquery api says the following:
Removing data from jQuery\'s internal .data() cache does not effect any HTML5 data- attributes in a document; use .
use the jQuery method removeData()
jQuery site states:
The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value. When called with no arguments, .removeData() removes all values.
The key part here is:
When called with no arguments, .removeData() removes all values.
https://api.jquery.com/removeData/