It had been in the works for a while, but now it has formally been adopted. From the article:
The regulation provides that by 2027 portable batteries incorporated into appliances should be removable and replaceable by the end-user, leaving sufficient time for operators to adapt the design of their products to this requirement.
I mean it shouldn’t be too much of an issue for manufacturers to make the change to these products to allow for replacement batteries. These devices being useless after only the battery failing is definitely an issue.
What you’ve described should be avoidable.
If they are in ears/over ears you could have a look online for teardowns. Some headphones can have the battery replaced it’s just not “official” and would invalidate any warranty but it looks like you’ve maybe not got too much to use.