I don’t have sound issues, but you may need to check your windows sound settings, your speakers, and check your MSFS sound settings.
If you set to Mute Sound on background to on, it will turn off the sound and music whenever the sim is “not in focus” in the Windows perspective.