Trouble combining YSort, ZIndex and TilemapLayer

Godot Version

4.3

Question

I have 3 tilemap layers (ground, object, decoration)
I wanted the player to appear in front and behind the objects and decorations.
The problem appears when i also want decorations above objects.
My setup:

  • Objects and decorations both have YSort turned on.
  • Decorations are higher on the screen than objects, thus YSorted into the back.
  • zIndex: Ground: 0, Objects: 1, Decorations: 2, Player: 1

I made objects and decorations have different zIndex to make sure one was above the other.
But I somehow want the player to have the zIndex of both. Almost as if I am looking for a zIndex range for YSort or something. Since I want the YSort to work for both layers yet for them to not mix.
I would like help coming up with a solution.

I guess this is turning into a feature request.
I would like if different TileMapLayers would not be YSorted together.
Or at least have some way of preventing that.

If all tiles have the same y-sort-origin you can try to set the decorations y-sort-origin one lower so its always in front of objects