Your shadow bias should never be 0. It should be as small as possible but large enough to eliminate shadow acne for your typical camera view and shadow map size.
I set the values as shown in the image and ran the program,
but light is coming through the ceiling in the hallway.
Why is this happening?
I suspect there might be something else needed besides these two parameters.
To minimize the shadow bleed, your walls should be “solid” boxes, not just planes.
Note that some artifacting is always expected with shadow maps. They’ll never be perfect unless your shadow map size is enormous. It’s a balancing act to minimize the artifacts by adjusting the parameters. The perceived quality is view dependent, so always tweak the shadows looking from your actual game camera instead of editor camera, and always use the actual light setup you plan to have in the game.