Sprites in 3D space, wrong draw order?

When I put 2 sprites one behind another, the one closer to the camera must be drawn over the other (even if they are in the same layer and the drawing order is the same), but sometimes when they are very close and I move one of them it the same surface as it is, or rotate the camera the sprite which is in the background starts to be drawn in the front.

it is taking the closest point of either sprite to the camera and drawing that one last. my guess is that you have a transparent part of the sprite that is closer to the camera which is why it keeps flashing between the two when it rotates.

i dont know of a great fix unless you change how your gameobject is coming together.