### 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
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo_int);
			} else {
				glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo_rt);
			}
			glBlitFramebuffer(0, 0, internal_size.x, internal_size.y, 0, 0, internal_size.x, internal_size.y, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);
		}
		if (fbo_int != 0) {
			
			glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo_int);
			glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo_rt);
			glBlitFramebuffer(0, 0, internal_size.x, internal_size.y, 0, 0, target_size.x, target_size.y, GL_COLOR_BUFFER_BIT, GL_LINEAR);
			glBlitFramebuffer(0, 0, internal_size.x, internal_size.y, 0, 0, target_size.x, target_size.y, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
		}
		glBindFramebuffer(GL_FRAMEBUFFER, fbo_rt);
	} else if ((fbo_msaa_3d != 0 && msaa3d_needs_resolve) || (fbo_int != 0)) {
		
		GLuint fbos[2]; 
		glGenFramebuffers(2, fbos);
		glBindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]);
		glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbos[1]);
		if (fbo_msaa_3d != 0 && msaa3d_needs_resolve) {
			GLuint read_color = rb->get_msaa3d_color();
			GLuint read_depth = rb->get_msaa3d_depth();
			GLuint write_color = 0;
			GLuint write_depth = 0;
			if (fbo_int != 0) {
				write_color = rb->get_internal_color();
				write_depth = rb->get_internal_depth();
			} else {
				write_color = texture_storage->render_target_get_color(render_target);