I don't remember if the game was made with unity, but there you can just have music in its own gameobject and call DontDestroyOnLoad() on it
That was exactly it. Don't know why I didn't know that was a thing until now, but that has now been fixed. Thanks for the tip!