Unfortunately, this is an internal issue with what the game was built on, so you can't change audio devices while the game is open without it freezing/crashing. The fix is at least simple (either don't have headphones plugged in, or don't unplug your headphones) but I understand it's really frustrating. Hopefully this can be fixed sometime down the line, but it's a pretty deep-rooted issue