How to reproduce
Run the following command or ctrl + middle click a jukebox that is playing
/setblock ~ ~ ~ minecraft:jukebox[has_record=true]{RecordItem:{id:"minecraft:music_disc_13",Count:1b}}
→ ❌ Notice that the music doesn't start playing. If you are playing 1.19.4 or above, you will see note particles
Right click the jukebox or destroy it
→ ✔ The music disc drops as expected showing that the record was in the jukebox
Just because you're specifying the NBT for the jukebox to have a record doesn't mean it's going to play. The music only plays when clicking on the jukebox with a record in hand.