### Godot version

4.0.stable.mono

### System information

Windows 10, NVIDIA RTX 2060 (Driver 30.0.14.7284), Vulkan 1.2.175 Forward+ (Editor)

### Issue description

When changing certain Global Shader Parameters (in this case, a mat4) in the Project Settings, the value sent to the editor 3D view appears to be undefined, resulting in garbage values sent to the shaders.

As an example here, I'm using a mat4 to describe global light directions for a lighting shader
Note that the shader receives a different value even when the editor is being set to the same values
https://user-images.githubusercontent.com/44537737/222551889-b7c7ca63-ef65-484c-818f-c6ce47a7d3c0.mp4

Setting the global parameter from a script does pass the correct value to the shaders
![image](https://user-images.githubusercontent.com/44537737/222552338-14582898-a76d-4ec4-b877-7b822e414901.png)

I have also determined the shaders in the editor also do not get correct values from the `project.godot` when loading the project.

### Steps to reproduce

- Create a Global Shader Parameter of mat4 type (Project > Project Settings... > Shader Globals)
- Create a shader that visualizes the value of the mat4 (`global uniform mat4 global_mat`)
- Attempt to modify the global in the same Project Settings menu, the shader will receive garbage values

### Minimal reproduction project

[GlobalShaderParameters.zip](https://github.com/godotengine/godot/files/10875801/GlobalShaderParameters.zip)

update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size);
}
static void bind_uniforms_generic(const Vector<RID> &p_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, int texture_offset = 0, const RS::CanvasItemTextureFilter *filter_mapping = filter_from_uniform, const RS::CanvasItemTextureRepeat *repeat_mapping = repeat_from_uniform) {
	const RID *textures = p_textures.ptr();
	const ShaderCompiler::GeneratedCode::Texture *texture_uniforms = p_texture_uniforms.ptr();
	int texture_uniform_index = 0;
	int texture_uniform_count = 0;
	for (int ti = 0; ti < p_textures.size(); ti++) {
		ERR_FAIL_COND_MSG(texture_uniform_index >= p_texture_uniforms.size(), "texture_uniform_index out of bounds");
		GLES3::Texture *texture = TextureStorage::get_singleton()->get_texture(textures[ti]);
		const ShaderCompiler::GeneratedCode::Texture &texture_uniform = texture_uniforms[texture_uniform_index];
		if (texture) {
			glActiveTexture(GL_TEXTURE0 + texture_offset + ti);
			glBindTexture(target_from_type[texture_uniform.type], texture->tex_id);
			if (texture->render_target) {
				texture->render_target->used_in_frame = true;
			}
			texture->gl_set_filter(filter_mapping[int(texture_uniform.filter)]);
			texture->gl_set_repeat(repeat_mapping[int(texture_uniform.repeat)]);
		}
		texture_uniform_count++;
		if (texture_uniform_count >= texture_uniform.array_size) {
			texture_uniform_index++;
			texture_uniform_count = 0;
		}
	}
}
void CanvasMaterialData::bind_uniforms() {