Oh goody, someone is using a more advanced system of TSC. I've done this exact thing before actually.
Event 86 is an H/V Trigger that is always active. (since I made a ton of them all lined up so wherever you go they are always within range of the PC)
Don't do this. It seems good in normal programming logic but in TSC terms there are only rare cases that you should do this.
Having an event loop (or using a <WAI without the player frozen) causes some adverse effects: The player can't be damaged / has no mercy invincibility,
other events that should be triggered may be ignored, you can't open the inventory, and other numerous problems.
The correct way to check if all the enemies are dead is to use the "run event on death" boolean, having all the events route at the end to a centralized event that checks if the flags are where they should be, that way it will be triggered
when the last enemy dies, so you won't need to constantly check.
The only thing is that it seems like you were already doing that, so I would make sure that the enemies you are using actually can die. Some entities simply go into a "death" state once its health reaches a low amount, so make sure each entity triggers the event it is assigned.