Is it possible to make Y-sorting for player and tilemap with layers with different Z Index

Godot Version
godot 4

Мy tilemap consists of different levels, for example the trees are on a level higher than the bushes to block them. When I started doing y-sorting of the player with the terrain, I ran into the problem that if the z indices of the player and layer were the same, everything worked well. And with different y-sorting does not work. Is it really possible that everything will have to be done on the same z index? Does anyone know how to solve this? I will be very glad for your help.