YEP Event Chase: on lose, briefly stopping event from chasing

I'm working on making certain enemies have a "territorial" quality, in which losing the battle does not result in a game over, but allows the party to run away at 1HP. These enemies use Yanfly's Event Chase plugin.

I already know how to allow the players to survive through the "can lose" tag in battle processing. The problem is that enemies that chase the player will IMMEDIATELY chase and reengage the party, not allowing them to run away. I need a way to prevent the enemy from chasing the player for a set amount of time... say, 5 seconds. After this point, the enemy will again attempt to chase the player if they haven't left the enemy's immediate vicinity. However, I have no idea how to do this with the Event Chase plugin.
Use the stealth add-on to that plugin http://www.yanfly.moe/wiki/Event_Chase_Stealth_(YEP) and run an event that triggers off of a switch like "Defeated" , when the player loses turn that switch on. Then have the "Defeated" event stealth the player, then turn the "Defeated" switch off after waiting 300 frames.
This worked perfectly, thank you!

I also realized that this will make it so NO enemy chases you for a short time after an encounter, but I think that's also probably a good thing for the player.

Original thread: https://forums.rpgmakerweb.com/threads/yep-event-chase-on-lose-briefly-stopping-event-from-chasing.114525/