### 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)

void set_flag(Flags p_flag, bool p_enabled);
	bool get_flag(Flags p_flag) const;
	void set_texture(TextureParam p_param, const Ref<Texture2D> &p_texture);
	Ref<Texture2D> get_texture(TextureParam p_param) const;
	
	Ref<Texture2D> get_texture_by_name(StringName p_name) const;
	void set_texture_filter(TextureFilter p_filter);
	TextureFilter get_texture_filter() const;
	void set_feature(Feature p_feature, bool p_enabled);
	bool get_feature(Feature p_feature) const;
	void set_uv1_scale(const Vector3 &p_scale);
	Vector3 get_uv1_scale() const;
	void set_uv1_offset(const Vector3 &p_offset);
	Vector3 get_uv1_offset() const;
	void set_uv1_triplanar_blend_sharpness(float p_sharpness);
	float get_uv1_triplanar_blend_sharpness() const;
	void set_uv2_scale(const Vector3 &p_scale);
	Vector3 get_uv2_scale() const;
	void set_uv2_offset(const Vector3 &p_offset);
	Vector3 get_uv2_offset() const;
	void set_uv2_triplanar_blend_sharpness(float p_sharpness);
	float get_uv2_triplanar_blend_sharpness() const;
	void set_billboard_mode(BillboardMode p_mode);
	BillboardMode get_billboard_mode() const;
	void set_particles_anim_h_frames(int p_frames);
	int get_particles_anim_h_frames() const;
	void set_particles_anim_v_frames(int p_frames);
	int get_particles_anim_v_frames() const;
	void set_particles_anim_loop(bool p_loop);
	bool get_particles_anim_loop() const;