Why are you using a parallel event (without conditionals) to change the z level? Now you're constantly changing it between 0 and 5. Put a player touch event on the doorway (that has conditional for player direction), or put a conditional in your parallel event that checks player y-coordinate. You might also have to use the refresh plugin command if you create new layers in an event. I think you can also change the properties with the script from the plugin instructions.
EDIT: Ok, noticed they're different ids, I thought you were changing the z of that wall segment. But anyway, my point stands.
EDIT 2: Like you can put the layers in the map notetags. And then use an event to only control the z level of that one segment.
Ok cool that it's working.
But when you set the layers you aren't going to change, (if you don't want to use map notetags) put them all in one autorun event and then at the end the 'erase event' command. You don't need to run the code all the time for the layers that don't change. Parallels are used in constantly running stuff in the background.
For the wall you want to change the z-index of, it works like that, but you can also put everything in one parallel event with just one page. At the beginning check the y-coordinate, then put the conditional you have in your screenshots + put an else branch on the conditional, where you change the z layer to the other value.