### 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
bool in_shadow_range = true;
		if (needs_shadow && light_storage->light_is_distance_fade_enabled(base)) {
			if (distance > fade_shadow + fade_length) {
				
				in_shadow_range = false;
			}
		}
		
		if (needs_shadow && in_shadow_range) {
			if (num_positional_shadows >= config->max_renderable_lights) {
				continue;
			}
			ShadowData &shadow_data = scene_state.positional_shadows[num_positional_shadows];
			li->shadow_id = num_positional_shadows;
			num_positional_shadows++;
			light_data.shadow_opacity = light_storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_OPACITY) * shadow_opacity_fade;
			float shadow_texel_size = light_storage->light_instance_get_shadow_texel_size(li->self, p_render_data->shadow_atlas);
			shadow_data.shadow_atlas_pixel_size = shadow_texel_size;
			shadow_data.shadow_normal_bias = light_storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS) * shadow_texel_size * 10.0;
			shadow_data.light_position[0] = light_data.position[0];
			shadow_data.light_position[1] = light_data.position[1];
			shadow_data.light_position[2] = light_data.position[2];
			if (type == RS::LIGHT_OMNI) {
				Transform3D proj = (inverse_transform * light_transform).inverse();
				GLES3::MaterialStorage::store_transform(proj, shadow_data.shadow_matrix);
			} else if (type == RS::LIGHT_SPOT) {
				Transform3D modelview = (inverse_transform * light_transform).inverse();
				Projection bias;
				bias.set_light_bias();
				Projection cm = li->shadow_transform[0].camera;