Lighting fails when using render.setShaderAuto() but good when shader generator is off

I can already conclude, yes, this will solve the problem. This situation has already been the subject of proceedings in this forum.