How do i fix my dynamic layer problem

so i made it so my tilemap props have dynamic layering but when my prop is taller then 1 tile it gives each tile the dynamic layer function so my player (White Box) keeps phasing in and out of the prop

Screenshot 2023-07-10 102109