Intersecting sprites

I’ve got a pretty specific problem, and I figured asking would be easier than trying to fry my brain with it

Basically, my characters/walls are made out of two sprites: a front sprite and a top sprite

The front sprite, if you were, would be the sprite you see in a platformer, while the top sprite is what you would see in a game with a top-down perspective

My problem is with how Unity renders sprites vs how I want to render the sprites (and there’s probably a way to render it the way I need/want)

I’ll illustrate:
This is how I need my sprites to be rendered:

And this is how Unity renders them:

As you might see, there isn’t really a problem when you’re looking from the top/front, but an issue does arise when you’re looking from any other angle between those two - which is an issue for me, since I’m making an isometric game.

I’d just like a hint on if there’s a way to do intersecting sprites, be it through a 3D flat model or through another way

Any help is very much appreciated.

I had this same issue in my own project and I solved it by creating a custom shader and material using Shader Graph. Changing the Surface setting to opaque made the sprites render how they should. The rest of what I did was basically mimicking the default sprite renderer. Attached is a screenshot of the final shader.