How to make BGS stop when the battle ends?

So, basically I created an event where everytine my hp is below 25% but above 0 it plays a bgs. It stops when I heal the character, but not when he dies. I tried all the solutions I found here (fadeout bgs, blank bgs, even a plugin that checks for events before the battle ends), but nothing worked at all.
Show us your event, and tell us what plugin you're using.
Here it is the event. And I'm using the HIME_EndPhaseTriggers
Where are you calling this event from? A troop event? Show a screenshot of that, too.
I've made a common event and then called it inside a troop page.
I don't see a reason in your event logic why that wouldn't work.

I notice that you're making a Pokémon-themed game - do you have more than one actor in your party? If you only have one actor and they die, the game over process would kick in before that event gets checked.
Well, yeah I have other members, however I made that just one actor enters the battle. Probably I'm gonna try switch between actors with an event, I don't know.

After a lot of tries, I've found a way. The way I did it was using the default state from MV (Immortal) in the beggining of battle and taking it after it.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-bgs-stop-when-the-battle-ends.142673/