I have my speakers connected to my sound card and my headphones to my monitor which has speakers of its own and a headphone jack.
I used to switch between the two using the ingame option.
Since the patch, the game will ALWAYS route audio to the soundcard, no matter how it is set up ingame and in windows.
Examples:
Windows default: soundcard, ingame: default device → sound via soundcard
Windows default: soundcard, ingame: monitor → sound via soundcard
And my favorite:
Windows default: monitor, ingame: monitor → no sound
Windows default: monitor, ingame: default device → sound via soundcard (not monitor as it should be)
This makes it obvious that GW2 completely ignores the settings and exclusively routes to the soundcard and not where you tell it or even the windows default device.