I’m sure this is due to Notes now having audio recording and voice transcription capabilities so like every other app it forces off background audio when a new audio source is available or for recording, yet as you mention, this stops it when the app simply opens. This is incredibly annoying.
The best workaround I’ve found is putting Music into Slide-Over then opening Notes, sliding out Music to re-start playback, and it will continue playing in Notes until you swap out and back into Notes app/window.
Of course the better solution is extremely simple: allow multiple audio sources at once in iOS! There is NO reason for this forced limitation to exist.