Autotile edge gets cut only on certain tiles even though the atlas is the same

Godot Version

v4.4.1-stable

Question

Hi, I’m working on a custom autotile system (4-direction bitmask)


In the first image, the top row of walls with the protruding sections renders correctly with no visual issues. But the row directly below it shows the right side of every wall tile being cut off (1–2 px missing).


In the second image, walls 1–3 have the right edge cut, wall 4 appears normal, and walls 5–6 are cut again.

Can anyone help?

Is Y-sorting enabled for the TileMapLayer? Are the tiles Y-sort origins set correctly?