That would be nice .

Depending on your setup (this may not be helpful at all lol), you could buy a male to female cord (those 3.5mm things).. Then when you want to change from speakers to headphones plug and unplug from this extended cord (computer -> extended male to female cord -> your speakers/headphone goes here, just plug/unplug as needed).

In the computer's eyes you never change cords :3. So I can for example change FFXIV from speakers to headphones, and of course other picky applications.

Not that the above should be the "solution" people go looking to for this issue lol. It'd be preferable this wasn't a problem of course. I have the cord setup for other reasons and just happened to notice it was helpful for applications that got picky lol (but depending on how you have things set up it may not be optimal/possible).