You're going to have to elaborate on what *this* is because I can't see what's wrong with it. 😛
I'm assuming the issue is that you can walk from the cliff onto the level below?
If so, layers usually don't have anything to do with being able to pass through certain tiles. Are your passability settings correct?
It's happening because of the priority on the top-of-cliff tiles. Anything that is a priority 1 will appear behind the player when the player is on a lower tile. But when on the same tile, it will appear in front of the player. This is how you make it so the player can walk behind things, but you have to stop them walking onto it from below.
And yeah, you need to actually explain what the issue is and not assume that it's obvious, because there are many things in a screenshot and attention may not go to the spot where you're having the issue. I'm only guessing at what it is because I've seen it trip people up before. So when you need help, say what it is that's happening, and what you expect to happen instead, just to make it clear.
oh - so the fact that you could walk onto the cliff from a lower level? Yes, in that case it's because of the tree. The tree tiles have O passability, which overrides the X passability of the cliff edge below. You could grab a blank tile and give it an X passability, and then draw with that on the highest layer, along the edge of the cliff. That would stop you walking from the ground onto the cliff. But it would also stop you going behind the cliff too.
Then you can duplicate those tiles and make them X passability, with the same priority, and replace the tree tiles on the highest layer with those instead.
So I tried and made a map like yours, but my character doesn't end up on the cliff, when she's walking behind the tree.
Again, are you sure your passability settings are correct?