Wrong zorder in viewport but ok in cycles render
@scurest was right! All that was needed was to set blend mode in material properties:
Material properties -&gt; Viewport display -&gt; Settings -&gt; Blend mode = opaque