### Godot version

4.2.dev 5ee983188de97ae027f9b9c1443438063f708a7e

### System information

Windows 10 - Compatibility renderer 

### Issue description

When running a VR project sky contribution is not working in the compatibility renderer:

![image](https://github.com/godotengine/godot/assets/1945449/7aa19569-95c8-41a2-913b-37b81f4728a7)

It is working fine in normal mode. Can be worked around by setting sky contribution to 0 and providing an ambient color.

### Steps to reproduce

Try any project with a proper sky setup in XR, just switch to compatibility renderer.

### Minimal reproduction project

I'll try and create an MVP soon that can be used without XR hardware, but for now this can be used:
https://github.com/BastiaanOlij/godot_openxr_demo
if (index_array_gl != 0) {
					
					glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_array_gl);
				}
				prev_index_array_gl = index_array_gl;
			}
			Transform3D world_transform;
			if (inst->store_transform_cache) {
				world_transform = inst->transform;
			}
			if (prev_material_data != material_data) {
				material_data->bind_uniforms();
				prev_material_data = material_data;
			}
			SceneShaderGLES3::ShaderVariant instance_variant = shader_variant;
			if (inst->instance_count > 0) {
				
				instance_variant = SceneShaderGLES3::ShaderVariant(1 + int(instance_variant));
			}
			uint64_t spec_constants = base_spec_constants;
			
			if constexpr (p_pass_mode == PASS_MODE_COLOR || p_pass_mode == PASS_MODE_COLOR_TRANSPARENT) {
				
				if (pass == 0) {
					spec_constants |= SceneShaderGLES3::BASE_PASS;
					if (inst->omni_light_gl_cache.size() == 0) {
						spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_OMNI;
					}
					if (inst->spot_light_gl_cache.size() == 0) {
						spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_SPOT;