Isometric rendering not quite right

Things look okay:
8411508--1111608--upload_2022-9-2_18-34-47.png

Til I get to the midline of the crate:
8411508--1111611--upload_2022-9-2_18-35-20.png

This kind of makes sense because, if there wasn’t a crate in front of it, it would look like this:
8411508--1111614--upload_2022-9-2_18-36-31.png

Any ideas on how to resolve this?

The simple solutions should be to just increase the collider size for player character (or whatever approach you use to prevent walking through walls) so that you can’t walk so close to objects where you clip in or between them.

As you observed yourself if there wasn’t a box in front sorting order for those two sprites would be correct. You really don’t want to be in situation where sorting order of two sprites depends on presence of third sprite.

theres no fix for this except to make your sprite not so wide, or restrict the collider

its sad but thats life