Setting Z-value of objects in Unity using Y-value
As shown in below image, set the Transparency Sort Mode to “Custom Axis” and set Y value to 1. Then the object order is changed according to the Y value.

To be ordered by this Custom Axis, the objects should be in a same Sorting Layer.
Unity version: 2019.4