Remove event command doesn't work?

I made an event that uses "jump to label" until a condition is met (variable changes each turn). Now the plan was that once the condition is met, dialogue appears and the event ends. While I do get the dialogue for some reason the event doesn't end. I don't know the exact name of it but there's that command that ends an event and removes it from the map until you re-enter. In this case it doesn't quite work. This should still work with autorun events, no? Can it not co-exist with label loops?

Uhh so I made a new event on a different map for testing and it turned out pretty much the same.

I placed an NPC on the map. The command list looks like this:

Label: bruh
Text: Up you go
Variable +1
If variable = 4
Text: well okay
Delete event
/end
Jump to label: bruh

What happens is that you talk to the guy and he repeats "Up you go" forever forever (which is not the problem here), and each time he does the variable goes up by 1. Once it reaches 4 the NPC says "well okay" and disappears but you're still stuck in the loop with "Up you go" being repeated forever (which is the problem). Safe to say I need to find some other way to do this. I kinda expected the event removal to kill the loop but I guess that would be too easy.
please show us what you have done (screenshot of the event pages), then we can tell you where you went wrong and how to correct the event.
I don't think what you've written is exactly what you've got in your event, because if the text shows, the event should disappear (the command is Erase Event). So yes, please show a screenshot.

Original thread: https://forums.rpgmakerweb.com/threads/remove-event-command-doesnt-work.139930/