Just setting the z_layer to 999 on click and 0 to release doesn't work because the top sprite can end up hiding behind another one (default sorting order)
I don't really understand what's the problem here. Did you try to change
If you don't want to rely on Z-order, another way is to use tree order. Sprites are drawn in the order they come in the tree, so if you want to bring a sprite forward, move it at the bottom of its siblings:
- Sprite1 < -- The sprite you want to be drawn last
- Sprite1 <-- move it here
This is also what popup GUI nodes use internally.