### 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
write_depth = texture_storage->render_target_get_depth(render_target);
			}
			for (uint32_t v = 0; v < view_count; v++) {
				glFramebufferTextureLayer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, read_color, 0, v);
				glFramebufferTextureLayer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, read_depth, 0, v);
				glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, write_color, 0, v);
				glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, write_depth, 0, v);
				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) {
			GLuint read_color = rb->get_internal_color();
			GLuint read_depth = rb->get_internal_depth();
			GLuint write_color = texture_storage->render_target_get_color(render_target);
			GLuint write_depth = texture_storage->render_target_get_depth(render_target);
			for (uint32_t v = 0; v < view_count; v++) {
				glFramebufferTextureLayer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, read_color, 0, v);
				glFramebufferTextureLayer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, read_depth, 0, v);
				glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, write_color, 0, v);
				glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, write_depth, 0, v);
				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);
		glDeleteFramebuffers(2, fbos);
	}
}
template <PassMode p_pass_mode>
void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, const RenderDataGLES3 *p_render_data, uint32_t p_from_element, uint32_t p_to_element, bool p_alpha_pass) {