Don't know if you're up for trying this, but it might solve your problem.
I've used a volume control app called "AudioManager Pro" for years. It contains sliders to control volume of the various functions, Alarms, Ringer, Alerts, Media, whatever. You can also create profiles with saved settings. I just tried a simple test with my phone. First, I opened up the app and made sure the Alerts slider was all the way up (full volume). Then, I started the music player using the on-board speaker. I then sent my phone an email. When the notification came in, I heard it over the music. Next, I opened the audiomanager app again and slid the Alerts slider all the way down (volume off). With the music player still playing, I sent another email and this time I didn't hear the notification (apparently because the volume was turned off) over the music. Might do the trick for you. (I never liked the way the default Android app controlled volume.)
It's a fee paid app, but I recommend it. (There's a free one too, but it might not have enough functionality.) The market page on it is here:
https://forums.androidcentral.com/e...WRhcHBzLmF1ZGlvd2lkZ2V0cHJvIl0&token=eMgVbxag.