Sort character over and under a tree 2D

I’m creating an 2d game atm and I have objects like trees and streetlights that I want my character to be able to go under. But I can either make the character over the whole object or under it and It needs to be half, if that makes sense. xD

Example:
If the object is at 0 and the character goes to y1 and is now under the tree. If I put the character to y-1 the root of the tree now appears to be over the character.

The only solution I can think of is I need to make the sprite into two parts and put it into two different sorting layers. But it didn’t work that great… Is there any other solution to this?

Will it work if you put the pivot of the tree at the point where you want it to sort?

I don’t know exactly what you mean… I’m a total noob but I did put the sprite sort point to pivot instead of center. DIdn’t change a thing though. Somehow I did something and now when I walk down my character goes under the tree and when I walk in another direction it goes back being infront.

Sometimes I feel like unity behaves really buggy or if there are some settings that are causing this.