You can try to change that "button Z is pressed" check to a scripted one instead.
That would look like this:
"Input.trigger?

Z)"
So, in the conditional branch settings, select "Script" and enter that (without the quotation marks).
The event seems good to me, I had the same one in my old project and that worked for me.
If it still won't work, than I have no idea. What FPS you get on the map? If it is low, than it can skip input checks occasionally.
Ohh and I just read that Andar wrote that you need a wait command in that event. You don't need a wait command there at all, so remove it.
The event only triggers if you press the button, so there can be no lag because of it.
If it would change a switch or variable constantly, than there would be lag, but this event does not do that.
So, if you have a wait command in it, than it is normal that the lantern won't always show up.