iPhone backup to friend's Mac - music library messed up?

Asking for a relative, as I have only ever backed up iOS devices to my own Mac or iCloud.
Person A has a phone that needed to be backed up to restore to a new phone. Person B backed up the phone to their Mac OS account on their Mac, using an encrypted backup, then restored the backup to the new phone.
Apps and wallpaper arrived on the new phone. Songs arrived but playlists did not. I heard there was an issue with merging the two music libraries.
When you back up a phone using someone else’s iTunes, do the music libraries get merged?