Why render.setShaderAuto() causes directional lighting not to work

You need to adjust the frustum of the light.

Here are several ways, you can choose the best option for your case.