If they have the same Z and are in different atlases, it's a little bit random which gets drawn first - so don't do that. It's the same if things in the same atlas have the same depth. Having things in the same atlas and not setting depth to something different is bad, mkay?
Remember if you have two atlases, you need to bring forward everything from the one you want most forward, or split it up into different Panels, otherwise things will get weird if you for any reason disable the one thing brought forward on the z axis, like in a scroll view.