### 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
_render_list_template<PASS_MODE_COLOR>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size());
	glDepthMask(GL_FALSE);
	scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_DISABLED;
	if (draw_sky) {
		RENDER_TIMESTAMP("Render Sky");
		glEnable(GL_DEPTH_TEST);
		glDisable(GL_BLEND);
		glEnable(GL_CULL_FACE);
		glCullFace(GL_BACK);
		scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED;
		scene_state.cull_mode = GLES3::SceneShaderData::CULL_BACK;
		_draw_sky(render_data.environment, render_data.cam_projection, render_data.cam_transform, sky_energy_multiplier, p_camera_data->view_count > 1, flip_y);
	}
	if (scene_state.used_screen_texture || scene_state.used_depth_texture) {
		Size2i size;
		GLuint backbuffer_fbo = 0;
		GLuint backbuffer = 0;
		GLuint backbuffer_depth = 0;
		if (rb->get_scaling_3d_mode() == RS::VIEWPORT_SCALING_3D_MODE_OFF) {
			texture_storage->check_backbuffer(rt, scene_state.used_screen_texture, scene_state.used_depth_texture); 
			size = rt->size;
			backbuffer_fbo = rt->backbuffer_fbo;
			backbuffer = rt->backbuffer;
			backbuffer_depth = rt->backbuffer_depth;
		} else {
			rb->check_backbuffer(scene_state.used_screen_texture, scene_state.used_depth_texture);
			size = rb->get_internal_size();
			backbuffer_fbo = rb->get_backbuffer_fbo();
			backbuffer = rb->get_backbuffer();
			backbuffer_depth = rb->get_backbuffer_depth();