Can't set data attributes in a localized button in a shared component

I noticed I can’t set data attributes on a localized button when it’s placed inside a shared component. It seems like a bug, or maybe I’m doing something wrong. Thanks for the help!

Main locale:

Sublocale: