Play a music disc, then either change the resource packs you have loaded or press F3+T to reload the resource packs. The music disc will stop playing and you have to eject and place it again in order to hear it.
Environment
Windows 10 x64 Minecraft versions 1.15 and 20w17a
Linked issues
is duplicated by 12
7 more links
This is intentional, the whole sound engine gets restarted when you load a resource pack, or do F3+T, furthermore, the resource pack may change the music.