If you're specifically having this issue when you use an overworld pipe, you'll need to make a level for the pipes and set the warps to transport you to the world map (Think SMB3's overworld pipes). Using the direct warp pipe functionality built into the map editor (the one where you click set and a rainbow cursor appears) will (with the current build at least) result in the music stopping once you use a warp pipe in-game.
Here's a screenshot example on how you can set up the warps in the pipe level (it's at the bottom):
It's likely this isn't your issue, but in the off chance it is, there ya go. Clarifying what you mean by it unselecting will help people get you your answer quicker. Be sure not to accidentally scroll your mouse wheel while in the music selection menu, also.