All events run every frame, so this is pretty common whenever you have events that check for a value and the state changes. In this case, the state that is changing is you’re changing scenes, so it immediately is checking for button clicks again.
You’ll want to dig into setting up a global variable as a toggle switch, and there’s some more info here: