Ok, seems no one has much to say about this and I don't blame you. This is probably my last update on the matter. Here's what I found out:
Part of the issue is that sound cards need to be virtualized for virtual machines. This may be obvious to most people here but it was not obvious to a noob like me. It seems, moreover, that the virtualization of sound cards for windows in Gnome Boxes has been buggy for a long time. I found a source from nearly six years ago that offers some clues:
Virtualized Windows runs great in GNOME boxes, but you need to tweak some settings to get good performance. Audio won’t work with the default settings.
www.ctrl.blog
I guess this is outdated, as expected. It suggests that I should edit the VM's xml file in a command line editor called virsh. Why it can't be edited directly I don't know, but I tried to do it as instructed and installed virsh. It says that I should edit the line saying <sound model='ac97'>, replacing it with <sound model='ich6'>. However that line in my xml file lists sound model as being 'ich9'. So I'm not sure what I should change it to, as ich6 just sounds like an older version of ich9. The whole section reads as following:
<sound model='ich9'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
</sound>
The article also suggests using an USB audio card, but the soundbar I'm using is already connected via USB, so I figure it amounts to the same thing.
Edit: I went ahead and edited the xml file in virsh, changing it to ich6. It makes no difference.
I think this is as deep as I can go in this issue. Perhaps I could try installing virtualbox and see if I'm luckier there, but maybe it's just not worth the effort. If no one has anything to add on this I'll just drop it. Thanks everyone for your attention.