### Godot version

v4.0.3.stable.arch_linux

### System information

Arch linux  - OpenGL API 4.2 (Core Profile) Mesa 21.3.9 Amber - Compatibility - Using Device: Intel Open Source Technology Center - Mesa DRI Intel(R) HD Graphics 2500 (IVB GT1)

### Issue description

I wrote a simple colorize shader:
```
uniform sampler2D color_map;
void fragment()
{
	vec2 uv = COLOR.rg;
	COLOR.rgb = texture(color_map, uv).rgb;
}
```
![20230614_21h26m15s_grim](https://github.com/godotengine/godot/assets/68549456/636c00f8-09e3-4be4-9784-787a3c35ae63)

But when I change the uniform parameter in the editor, it turned into this
![20230614_21h07m45s_grim](https://github.com/godotengine/godot/assets/68549456/0ac2430d-33f5-4c4a-8cd0-bd2f76b575cf)

However, this issue does not appear on Vulkan renderer (Foward+ and Mobile) 

### Steps to reproduce

Change value in the gradient in the shader parameter.

### Minimal reproduction project

[shader-bug.zip](https://github.com/godotengine/godot/files/11746761/shader-bug.zip)

int h = img->get_height();
	int tsize = 0;
	for (int i = 0; i < mipmaps; i++) {
		int size, ofs;
		img->get_mipmap_offset_and_size(i, ofs, size);
		if (compressed) {
			glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
			int bw = w;
			int bh = h;
			glCompressedTexImage2D(blit_target, i, internal_format, bw, bh, 0, size, &read[ofs]);
		} else {
			glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
			if (texture->target == GL_TEXTURE_2D_ARRAY) {
				if (initialize) {
					glTexImage3D(GL_TEXTURE_2D_ARRAY, i, internal_format, w, h, texture->layers, 0, format, type, nullptr);
				}
				glTexSubImage3D(GL_TEXTURE_2D_ARRAY, i, 0, 0, p_layer, w, h, 1, format, type, &read[ofs]);
			} else {
				glTexImage2D(blit_target, i, internal_format, w, h, 0, format, type, &read[ofs]);
			}
		}
		tsize += size;
		w = MAX(1, w >> 1);
		h = MAX(1, h >> 1);
	}
	texture->total_data_size = tsize;
	texture->stored_cube_sides |= (1 << p_layer);
	texture->mipmaps = mipmaps;
}
Image::Format TextureStorage::texture_get_format(RID p_texture) const {