### Godot version

4.0.2.stable.official

### System information

Windows 10, NVIDIA GeForce RTX 2080 SUPER, Driver 516.94, Vulkan backend

### Issue description

When referencing a built-in matrix (MODEL_MATRIX, VIEW_MATRIX...) within the light() function of a spatial shader, these errors are thrown per renderer:

Forward+:
```
-   servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp:171 - Condition "!shader_singleton->shader.version_is_valid(version)" is true.
```
Mobile:
```
-   servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp:182 - Condition "!shader_singleton->shader.version_is_valid(version)" is true.
```
Compatibility (MODEL_MATRIX is referenced):
```
-  drivers/gles3/shader_gles3.cpp:242 - SceneShaderGLES3: Fragment shader compilation failed:
-   0(521) : error C1503: undefined variable "model_matrix"
-   drivers/gles3/shader_gles3.cpp:342 - Method/function failed.
```

The shader displays a fallback instead of what's written. This can be avoided by defining a variable that is identical to the matrix and referencing that instead:

```
shader_type spatial;

varying mat4 mdlMtx;

void vertex() {
	mdlMtx = MODEL_MATRIX;
}

void light() {
	mdlMtx; // works
//	MODEL_MATRIX; // doesn't work
}
```


### Steps to reproduce

In a spatial shader, reference any built-in matrix within the light function:

```
shader_type spatial;

void light() {
	DIFFUSE_LIGHT += ATTENUATION; // lighting that should be displayed
	MODEL_MATRIX; // breaks the shader, displays a fallback
}
```

### Minimal reproduction project

[issue_light_matrices.zip](https://github.com/godotengine/godot/files/11356572/issue_light_matrices.zip)

bool depth_pre_pass_enabled = bool(GLOBAL_GET("rendering/driver/depth_prepass/enable"));
	for (int i = 0; i < CULL_VARIANT_MAX; i++) {
		RD::PolygonCullMode cull_mode_rd_table[CULL_VARIANT_MAX][3] = {
			{ RD::POLYGON_CULL_DISABLED, RD::POLYGON_CULL_FRONT, RD::POLYGON_CULL_BACK },
			{ RD::POLYGON_CULL_DISABLED, RD::POLYGON_CULL_BACK, RD::POLYGON_CULL_FRONT },
			{ RD::POLYGON_CULL_DISABLED, RD::POLYGON_CULL_DISABLED, RD::POLYGON_CULL_DISABLED }
		};
		RD::PolygonCullMode cull_mode_rd = cull_mode_rd_table[i][cull_mode];
		for (int j = 0; j < RS::PRIMITIVE_MAX; j++) {
			RD::RenderPrimitive primitive_rd_table[RS::PRIMITIVE_MAX] = {
				RD::RENDER_PRIMITIVE_POINTS,
				RD::RENDER_PRIMITIVE_LINES,
				RD::RENDER_PRIMITIVE_LINESTRIPS,
				RD::RENDER_PRIMITIVE_TRIANGLES,
				RD::RENDER_PRIMITIVE_TRIANGLE_STRIPS,
			};
			RD::RenderPrimitive primitive_rd = uses_point_size ? RD::RENDER_PRIMITIVE_POINTS : primitive_rd_table[j];
			for (int k = 0; k < PIPELINE_VERSION_MAX; k++) {
				ShaderVersion shader_version;
				static const ShaderVersion shader_version_table[PIPELINE_VERSION_MAX] = {
					SHADER_VERSION_DEPTH_PASS,
					SHADER_VERSION_DEPTH_PASS_DP,
					SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS,
					SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS_AND_VOXEL_GI,
					SHADER_VERSION_DEPTH_PASS_WITH_MATERIAL,
					SHADER_VERSION_DEPTH_PASS_WITH_SDF,
					SHADER_VERSION_DEPTH_PASS_MULTIVIEW,
					SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS_MULTIVIEW,
					SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS_AND_VOXEL_GI_MULTIVIEW,
					SHADER_VERSION_COLOR_PASS,