I have a project here (the sprites are placeholders from a tutorial). The tilemap is in the same y-sort as the player, y-sort is enabled on the everything, the tile origin set to bottom-left, and the player's sprite position is offset so that the tile overhangs above the player when they're behind a wall and so the player overhangs the wall when they're in front of it. The only problem is if the player is high above one tile, the bottom of their sprite is overlapped and the top isn't:
So I tried increasing the Z-Index on all tiles except for the bottom half of walls and it worked; the entire sprite is covered up when they're as high up as in the picture above, but then I noticed if I do a roll which raises the sprite's image a little, the top of the sprite gets cut off:
Is their a way so the top doesn't get cut off like that, but the walls don't overlap half the sprite or can I not have it both ways.
Player sprite is incorrectly behind one tile and over another
11 days later
I've tried out all sorts of tileset settings and nothing worked. My only thought is to make the walls 1w2h squares and the ceiling 1w1h squares, but I'd rather not have to do that.
Unfortunately I have not used Tilemap nodes enough to have encountered this problem or any solutions. That said, you may want to ask Groud, as he is working on TileMap improvements in Godot 4.0 and so he might also know how to work around the problem you are currently facing.