### 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
count = count * 2;
			}
			if constexpr (p_pass_mode != PASS_MODE_DEPTH) {
				
				if (p_render_data->render_info) {
					p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE][RS::VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME]++;
				}
			}
			if (inst->instance_count > 0) {
				
				
				GLuint instance_buffer = 0;
				uint32_t stride = 0;
				if (inst->flags_cache & INSTANCE_DATA_FLAG_PARTICLES) {
					instance_buffer = particles_storage->particles_get_gl_buffer(inst->data->base);
					stride = 16; 
				} else {
					instance_buffer = mesh_storage->multimesh_get_gl_buffer(inst->data->base);
					stride = mesh_storage->multimesh_get_stride(inst->data->base);
				}
				if (instance_buffer == 0) {
					
					break;
				}
				glBindBuffer(GL_ARRAY_BUFFER, instance_buffer);
				glEnableVertexAttribArray(12);
				glVertexAttribPointer(12, 4, GL_FLOAT, GL_FALSE, stride * sizeof(float), CAST_INT_TO_UCHAR_PTR(0));
				glVertexAttribDivisor(12, 1);
				glEnableVertexAttribArray(13);
				glVertexAttribPointer(13, 4, GL_FLOAT, GL_FALSE, stride * sizeof(float), CAST_INT_TO_UCHAR_PTR(sizeof(float) * 4));