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

TextureChannel get_ao_texture_channel() const;
	void set_refraction_texture_channel(TextureChannel p_channel);
	TextureChannel get_refraction_texture_channel() const;
	static void init_shaders();
	static void finish_shaders();
	static void flush_changes();
	static Ref<Material> get_material_for_2d(bool p_shaded, Transparency p_transparency, bool p_double_sided, bool p_billboard = false, bool p_billboard_y = false, bool p_msdf = false, bool p_no_depth = false, bool p_fixed_size = false, TextureFilter p_filter = TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, AlphaAntiAliasing p_alpha_antialiasing_mode = ALPHA_ANTIALIASING_OFF, RID *r_shader_rid = nullptr);
	virtual RID get_shader_rid() const override;
	virtual Shader::Mode get_shader_mode() const override;
	BaseMaterial3D(bool p_orm);
	virtual ~BaseMaterial3D();
};
VARIANT_ENUM_CAST(BaseMaterial3D::TextureParam)
VARIANT_ENUM_CAST(BaseMaterial3D::TextureFilter)
VARIANT_ENUM_CAST(BaseMaterial3D::ShadingMode)
VARIANT_ENUM_CAST(BaseMaterial3D::Transparency)
VARIANT_ENUM_CAST(BaseMaterial3D::AlphaAntiAliasing)
VARIANT_ENUM_CAST(BaseMaterial3D::DetailUV)
VARIANT_ENUM_CAST(BaseMaterial3D::Feature)
VARIANT_ENUM_CAST(BaseMaterial3D::BlendMode)
VARIANT_ENUM_CAST(BaseMaterial3D::DepthDrawMode)
VARIANT_ENUM_CAST(BaseMaterial3D::CullMode)
VARIANT_ENUM_CAST(BaseMaterial3D::Flags)
VARIANT_ENUM_CAST(BaseMaterial3D::DiffuseMode)
VARIANT_ENUM_CAST(BaseMaterial3D::SpecularMode)
VARIANT_ENUM_CAST(BaseMaterial3D::BillboardMode)
VARIANT_ENUM_CAST(BaseMaterial3D::TextureChannel)
VARIANT_ENUM_CAST(BaseMaterial3D::EmissionOperator)
VARIANT_ENUM_CAST(BaseMaterial3D::DistanceFadeMode)
class StandardMaterial3D : public BaseMaterial3D {