This forum does not answer 24/7 weekends its a ghost town at times.......
and not all who own a moment are in here 99% do not know this exist.
Using your device in settings:
NOTIFICATIONS; runs usb port, head set port, sms txt, and a few more
Application or phone etc..... plugged in head set if bluetooth or wired, bypasses speaker and works, Plays Notification
unplugging plays notification and bypasses headset and runs through speaker.
You are running what application Please?

?
when you lose a signal, data the Application is forced to crash, forcing you to reset, shut off the app, and start over.
I use Iheart radio I open it, and at times I have to close down,
I guess no one wants to respond to your inquerry because when you close a app you have to stop play. on that particular program
Example Music player open music, play song to shut down hit play and then home. by placing/removing headset, you'll not force clousure of sound or app, you'll hear music and notifications