### Godot version

4.0.2 stable

### System information

issue tested on win10 with ryzen 7 and rx 6600, win11 with ryzen 7 and gtx 3050

### Issue description

When creating a screen reading post processing shader, the normal buffer functions correctly in the editor, but does not seem to be functioning as expected in debug, producing only a solid colour when run. I am unsure if this behaviour is intended, but if so, I feel it should be properly documented.

Running correctly in editor:
![image](https://user-images.githubusercontent.com/71034402/230672620-fc5e4baf-c12e-4755-b7a2-206087459307.png)

Solid colour in debug:
![image](https://user-images.githubusercontent.com/71034402/230672489-d9c29755-c2d3-4e72-9ea0-355148e916fe.png)


### Steps to reproduce

*this shader should be attached to a MeshInstance3D quadmesh*
minimal shader to reproduce:

```glsl
shader_type spatial;
render_mode unshaded, cull_disabled;

uniform sampler2D NORMAL_TEXTURE : hint_normal_roughness_texture, filter_linear_mipmap;

void vertex(){
	VERTEX *= 2.0;
	POSITION = vec4(VERTEX, 1.0);
}

void fragment(){
	ALBEDO = texture(NORMAL_TEXTURE, SCREEN_UV).rgb;
}
```

### Minimal reproduction project

N/A
lcd.sh[j * 4 + 1] = src_capture[j].g;
						lcd.sh[j * 4 + 2] = src_capture[j].b;
						lcd.sh[j * 4 + 3] = src_capture[j].a;
					}
					flags |= INSTANCE_DATA_FLAG_USE_LIGHTMAP_CAPTURE;
					inst->gi_offset_cache = lightmap_captures_used;
					lightmap_captures_used++;
					uses_lightmap = true;
				}
			} else {
				if (p_using_opaque_gi) {
					flags |= INSTANCE_DATA_FLAG_USE_GI_BUFFERS;
				}
				if (inst->voxel_gi_instances[0].is_valid()) {
					uint32_t probe0_index = 0xFFFF;
					uint32_t probe1_index = 0xFFFF;
					for (uint32_t j = 0; j < scene_state.voxelgis_used; j++) {
						if (scene_state.voxelgi_ids[j] == inst->voxel_gi_instances[0]) {
							probe0_index = j;
						} else if (scene_state.voxelgi_ids[j] == inst->voxel_gi_instances[1]) {
							probe1_index = j;
						}
					}
					if (probe0_index == 0xFFFF && probe1_index != 0xFFFF) {
						
						SWAP(probe0_index, probe1_index);
					}
					inst->gi_offset_cache = probe0_index | (probe1_index << 16);
					flags |= INSTANCE_DATA_FLAG_USE_VOXEL_GI;
					uses_gi = true;