Any idea why this is happening?

The y-sort is working in the top row, but not in the bottom row.

The fence is a TileMapLayer with y-sort enabled, while the pens are TextureRects. The top of the TextureRect is below (on the Y axis) the top of the fence tile...

#Godot #GodotEngine #GameDev #YSort