For this top down game, and I want the player to be able to place rooms wherever they want, and however big they want. The NinePatchRect node seems perfect for this, since I can resize textures and they retain their quality, but obviously NinePatch is a Control node, so I can't change its z index.
The problem is, I need the player to be able to go behind the wall. I currently set the player's z index as their y position every frame. All the NinePatchRects are stuck at a z index of 0, so my player is always above them. Any idea on how I can make this work?

My setup.

In-game. The player is supposed to be hidden behind the wall.