Do not mute Sound on incoming notification - Android, YouTube
The Don't Pause! app promises to help here:


  Are you tired of Notifications interrupting your music?
  […]
  Don't Pause was designed to keep your device from interrupting you when you are listening to music. If you are listening to music through your android phone and you get a text message or email, by default, Android pauses your music and plays the notification. Don't Pause fills in here. Don't Pause will run continuously once you start it and when you are playing music it automatically puts your notifications on vibrate. After you finish your music, Don't Pause automatically changes your setting back to the normal ringer.


I have not tried the app myself (no use-case for me), but a 4-star rating with more than 2.5k votes sounds promising.