If you are using the High Definition Render Pipeline (HDRP) in Unity and you are seeing light going through walls when the smoothness of your materials is under 0.7, this is most likely happening because of how the HDRP handles reflections.
In the HDRP, reflections are computed using the screen space reflections (SSR) algorithm, which approximates the reflections on the surfaces of objects by sampling the screen space color around the reflection rays. This algorithm is efficient and produces good-looking reflections, but it has some limitations. One of these limitations is that it can only handle smooth surfaces, and it can sometimes produce incorrect reflections on rough surfaces.
To fix this issue, you can try increasing the smoothness of your materials to above 0.7. This will make your materials smoother, and the HDRP’s SSR algorithm will be able to handle the reflections on these surfaces more accurately.
Alternatively, you can disable the SSR algorithm for your materials by unchecking the “Screen Space Reflections” option in the “Reflections” section of the material’s properties. This will prevent the HDRP from rendering reflections on your materials, so you will not see light going through walls, but it will also make your materials look less reflective.
I hope this helps! Let me know if you have any other questions.