Problem with correct display of sprite layers in URP 3d scene

I’m making a game similar in style to Don’t Starve.

I have a tree consisting of leaves and a base. The foliage should be displayed on top of the trunk in 3D space using sprites. When I move the foliage along the Z axis, everything is displayed correctly. However, if I move the tree to an area that can be characterized as the top-left of the screen divided by a line from the bottom left corner to the right corner, the tree trunk comes to the foreground.

What I tried:

  1. changing the depth of the foliage position relative to the tree along the Z axis - the further the foliage is from the trunk, the more this bug appears. However, this approach visually worsens the view of the tree, which is not acceptable.
  2. changing the display order - this also solves the problem, but trees must remain three-dimensional objects. In addition, if a conditional “giant” passes between trees, the foliage should be on top of it, not behind it.
  3. I tried to change the order of displaying layers through the script, based on the distance to the camera, but because of the peculiarities of this area, this also does not work correctly.
    Is there any way to change the display order locally within the object or what affects this problem? Note: at startup, the camera is looking down at a 45 degree angle and the trees are rotated 45 degrees to it so as to reduce perspective. If I set the rotation of the object to the camera not through its local orientation, but in the direction towards the camera as if all the trees were facing the camera, this bug disappears. However, this approach breaks the lighting and stylistics, which is also not acceptable.