There does not seem to be a way to properly sort different-sized objects along the y axis (or probably any axis) using the current distance sorting implementation. With a custom axis of 0, 1, 0 and sprite pivot set to “bottom” only objects that are the same “height” (y length) are sorted properly.
The orange rectangle is sorted properly at its feet because it is the same height as the red square and thus shares the same center. The green square is smaller and does not get sorted at its feet.
think in unity 5.5+ they introduced some sort of sprite grouping, system, I cannot remember what it is called, if not you can do this yourself, the following code will be you the position and the width/height, I’m not to sure if this is in worldspace.
mRenderer is the SpriteRenderer
Single mWidth = mRenderer.bounds.size.x;
Single mHeight = mRenderer.bounds.size.y;
Single mLeft = Drawing.transform.position.x - (mWidth * 0.5f);
Single mTop = Drawing.transform.position.y - (mHeight * 0.5f);
Rect mArea = new Rect(mLeft, mTop, mWidth, mHeight);
then all you need to do is do that to the Red box and adjust the sprite layer index accordingly.