Light passes through the mesh

I generate my own mesh, attach my shader to it, which I copied from the lit shader and modified for triplanar, everything works fine except for one thing - the light passes through the mesh and I can’t figure out what exactly the problem might be. An example in the video, I use Cull Back and Cull Off, only one light source works.

My shader uses 3 passes - Forward pass, Shadow pass, DepthOnly pass.

I also tried 2 types of shadows from the light source - soft and hard.

the test shows that in this example the light passes through 2 walls (mesh).

Tell me what else I can try, what I should pay attention to, what could be the reason?

and in general the reason is in the construction of the grid or in the shader…

(Unity 6000.0.32f1 - URP)

I noticed this - if I set the shadow strength to maximum (1), then the light does not pass through the walls (mesh), it looks as it should, but I need transparent shadows, and when I set them to less than 1, then the light passes through the walls (mesh)…