What we achieve placing both the
TileMap and player as direct children of
Ysort is that when the player Y position is higher than the tilemap Y position, our player is drawn above the tiles, but this is using the "general"
TileMap Y position value, not the individual tiles Y value.
What I understand you (and also me) want to achieve is sorting our player along with the tiles of a
TileMap. In version 3.1, there's a "Y Sort" option on the
TileMap, but it (again) just acts as an YSort, sorting only the direct children of the tilemap (not its tiles).
I think that a solution is to place the tiles manually as a sprite as a child of
Ysort, but that is defying the purpose of
TileMap I think.