Problem with realtime lighting

In the game i am making the map(a big maze) is generated at runtime. Thus the lighting is mostly realtime(apart from a few large structures). The issue i have is that the light shines through the walls(and you dont want that in a maze). Raycasting from every light on the map to the camera is not an option as it can harm performance. All of the walls in the map have cast shadows option on. Walls are made from multiple models (walls, pillars, etc.). Can i solve the issue with shaders? I am a noob when it comes to shaders(and lighting) so sorry if its an obvious solution. Can i do anything else to solve the issue?

P.S. sorry for my English, its not my native language)

Is the game first-person or third-person view? I think if the game is in first-person, then you can optimize and deactivate sections of the maze that are not visible.

It is first- person. How would you suggest going about disabling parts of the maze? Raycasting from every object to camera? Or something else?

You could try additive scene lighting for this purpose. Please take a look at our official examples here - Additive Loading Lighting Examples | Tutorials | Unity Asset Store

you have to change the wall gameobject shadows from on to double sided and it should fix your issue