In the control panel's Automation section you can choose a scenario that starts when combat begins (Combat by default), or Nothing to leave the music alone.
When the combat is deleted, the music goes back to what was playing before, or stops if you untick Go back to the previous music when combat ends.
If you start other music by hand during the fight, it is left alone when the combat ends.
This page mirrors the Scenario Soundtracks wiki on GitHub.