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

static void _bind_methods();
	virtual bool _can_do_next_pass() const;
	virtual bool _can_use_render_priority() const;
	void _validate_property(PropertyInfo &p_property) const;
	void _mark_initialized(const Callable &p_queue_shader_change_callable);
	bool _is_initialized() { return init_state == INIT_STATE_READY; }
	GDVIRTUAL0RC(RID, _get_shader_rid)
	GDVIRTUAL0RC(Shader::Mode, _get_shader_mode)
	GDVIRTUAL0RC(bool, _can_do_next_pass)
	GDVIRTUAL0RC(bool, _can_use_render_priority)
public:
	enum {
		RENDER_PRIORITY_MAX = RS::MATERIAL_RENDER_PRIORITY_MAX,
		RENDER_PRIORITY_MIN = RS::MATERIAL_RENDER_PRIORITY_MIN,
	};
	void set_next_pass(const Ref<Material> &p_pass);
	Ref<Material> get_next_pass() const;
	void set_render_priority(int p_priority);
	int get_render_priority() const;
	virtual RID get_rid() const override;
	virtual RID get_shader_rid() const;
	virtual Shader::Mode get_shader_mode() const;
	virtual Ref<Resource> create_placeholder() const;
	Material();
	virtual ~Material();
};
class ShaderMaterial : public Material {