How to fix dynamic layer sorting for 2D

I’m trying to make it so the player (The White Box) when they are in front there sprite is in front and when they are in the back there sprite is in the back but instead every tile uses this feature how do i fix this?

Screenshot 2023-07-10 102129