I think i found a way. First delete those music classes you made and revert back to play sound at location but replace the play sound with spawn sound wherever you like. So basically undo everything i said before but replace play sound with spawn sound node.
1.) Create a boolean variable called stopmusic in you player character blueprint.
2.) Set that variable to true when the game is over.
3.) Now go to each blueprints that contain spawn sound at location nodes and cast to third person character and make a reference variable from that cast.
4.) Now wherever you have the spawn sound at location node, drag the return value of the node and search for stop.
5.) Then use an event tick to make a branch node and on the red pin of the branch node get the stopmusic variable from the reference variable.
6.) Now when the stopmusic variable is true then you take the execution pin of the true node and connect it to the stop node you created before.

