Rendering of objects according to depth in cetz

Sounds similar to How can I draw a line in cetz over any other regardless? - #2 by jwolf.