I play on a laptop running Windows 10. I have the laptop connected to a TV to use as a display. When I turn the TV on, it automatically switches the audio output from the laptop's speakers to the TV. If I have Minecraft running when the audio output changes, whether I'm on the title menu or in game, the music that is playing will stop or change songs. This affects music played on jukeboxes as well. This issue also happens when connecting the laptop to a Bluetooth speaker.
Related issues
Comments

Thank you for your report!
We are tracking this issue in MC-237708, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Wonβt Fix, which means this is considered a bug but will not be fixed. The description of that ticket or the comments might explain the rationale. Please do not leave a comment on the linked ticket.
If you havenβt already, please make use of the search feature to see whether an issue has already been reported.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki