I cannot test it on Windows because I'm using Linux but I found this feature request in which the opener would like to have the feature that the sound gets minimized when window has been minimized. This makes me assume that your problem happens because of a Windows settings (somewhere) and not a VirtualBox setting as VirtualBox seems not to have that "feature".
An alternative might be to use
Seamless Mode. This integrates windows (and alert boxes) from the guest OS into the current Windows desktop session. This way you should be able to hear the sound.
To achieve this, select "View" in the menu bar of the VM window and then "Switch to seamless mode"