If you are trying to define the language of a page via hreflang, it’s generally better to use one way of doing so rather than multiple.
A Redditor asked if there were any issues when an XML sitemap includes hreflang markup and the site is also including hreflang markup via jQuery.
Google’s John Mueller replied with,
If you have it in the sitemap, just use that. Adding a second set via jQuery just makes it much harder to diagnose, find, & fix errors.