Pherhaps one could make a global variable for the background sprite/image index and change the sprite/image index based on the presence of an enemy type?
Viewing post in Dynamic Battle Background
For more complex backgrounds:
2:
https://forum.gamemaker.io/index.php?threads/earthbound-battle-background-sprites.99273/
For more simple backgrounds: