isometric y-sort problem

Godot Version

Godot 4.4 stablebranch master

Question

I am recreating Isocore(a game hasn't come out yet, but i want to recreate them through John's devlog, j4f) in godot 4.4 stable,I’m 14 years old now, and this is my first project in my life, i used ai to write code for me. But when i followed his devlogs, the terrain generation are oke, i had some elevations but things got worse when i moved to spawn objects(especially tall object like light bulb=))). The light bulb get y-sorted in the wrong way, the collision fly somewhere idk.=).My goal is that tall object(/and even small) can be spawned in right layer(or height), and the y-sort looks right. Here is the screenshot from my clone now(and a link to my github project(master branch):

Could you provide some details on what isn’t right? What looks wrong? What did you just change in the code? I can see the house overlapping with the base in the center of the image, but that might just be because of modular sprites.

Please see this to get some hints on how to ask questions in a way that gets the answers you want

i didn’t change any code from my github. I think the ysort for the streetlights, it taller than 1 tile height so i use function init(that runs the logic of slice sprite) to cut it down into slices durring runtime, and then assign cut sprites in one tile in the world coordinate, i think that should work but the lamp get y sorted wrong, in layer 1, it works perfectly(the collision in the right place, right below the lamp sprite), but in layer larger than 2, sprite

get sorted wrong, the bottom of the lamps got gut( and even rocks too), the higher the layer is, the more sprite got cut and in layer 4, i cannot see any sprite of objects. the red hover is the real collision pos of that lamp, idk why sprite flew in that way, and the sprite got cut into pieces(image 1), rocks in layer 2 and more are filled by the grass tile which should be under them( i cant upload 2 images here cause my acc is new, sorry for that)

oh sure, sorry , this is the very first time I use forum to ask sth, so I lack experience in formulating questions and stating my desires. Thanks for your help, I’ll learn how to do that right now!