### Godot version

4.0.3 stable

### System information

Windows 10 - Godot v4.0.3 - Vulkan (Forward+) - Nvidia GTX 1070Ti

### Issue description

The ORM material does not pick up the animated WorldEnvironment ambient lighting. It works in the viewport but not when running the game. 


https://github.com/godotengine/godot/assets/42893106/4cdff3d4-4418-4d66-ac6a-a911fc137d45



### Steps to reproduce

1. Create a 3D scene.
2. Create a mesh and apply a ORM material to it
3. Create a WorldEnvironment node
4. Create an AnimationPlayer
5. Animate the WorldEnvironment energy multiplier from 0 to 1
6. Play the animation in the viewport and then play the scene and see the difference.

### Minimal reproduction project
[ORM_bug.zip](https://github.com/godotengine/godot/files/11602866/ORM_bug.zip)

uint64_t texture_filter : get_num_bits(TEXTURE_FILTER_MAX - 1);
		uint64_t detail_uv : get_num_bits(DETAIL_UV_MAX - 1);
		uint64_t transparency : get_num_bits(TRANSPARENCY_MAX - 1);
		uint64_t alpha_antialiasing_mode : get_num_bits(ALPHA_ANTIALIASING_MAX - 1);
		uint64_t shading_mode : get_num_bits(SHADING_MODE_MAX - 1);
		uint64_t blend_mode : get_num_bits(BLEND_MODE_MAX - 1);
		uint64_t depth_draw_mode : get_num_bits(DEPTH_DRAW_MAX - 1);
		uint64_t cull_mode : get_num_bits(CULL_MAX - 1);
		uint64_t diffuse_mode : get_num_bits(DIFFUSE_MAX - 1);
		uint64_t specular_mode : get_num_bits(SPECULAR_MAX - 1);
		uint64_t billboard_mode : get_num_bits(BILLBOARD_MAX - 1);
		uint64_t detail_blend_mode : get_num_bits(BLEND_MODE_MAX - 1);
		uint64_t roughness_channel : get_num_bits(TEXTURE_CHANNEL_MAX - 1);
		uint64_t emission_op : get_num_bits(EMISSION_OP_MAX - 1);
		uint64_t distance_fade : get_num_bits(DISTANCE_FADE_MAX - 1);
		
		uint64_t deep_parallax : 1;
		uint64_t grow : 1;
		uint64_t proximity_fade : 1;
		
		uint32_t feature_mask;
		uint32_t flags;
		MaterialKey() {
			memset(this, 0, sizeof(MaterialKey));
		}
		static uint32_t hash(const MaterialKey &p_key) {
			return hash_djb2_buffer((const uint8_t *)&p_key, sizeof(MaterialKey));
		}
		bool operator==(const MaterialKey &p_key) const {