### 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
uint64_t last_scene_shadow_pass = light_storage->light_instance_get_shadow_pass(p_light);
		if (last_scene_shadow_pass != get_scene_pass()) {
			light_storage->light_instance_set_directional_rect(p_light, light_storage->get_directional_shadow_rect());
			light_storage->directional_shadow_increase_current_light();
			light_storage->light_instance_set_shadow_pass(p_light, get_scene_pass());
		}
		use_pancake = light_storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_PANCAKE_SIZE) > 0;
		light_projection = light_storage->light_instance_get_shadow_camera(p_light, p_pass);
		light_transform = light_storage->light_instance_get_shadow_transform(p_light, p_pass);
		atlas_rect = light_storage->light_instance_get_directional_rect(p_light);
		if (light_storage->light_directional_get_shadow_mode(base) == RS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS) {
			atlas_rect.size.width /= 2;
			atlas_rect.size.height /= 2;
			if (p_pass == 1) {
				atlas_rect.position.x += atlas_rect.size.width;
			} else if (p_pass == 2) {
				atlas_rect.position.y += atlas_rect.size.height;
			} else if (p_pass == 3) {
				atlas_rect.position += atlas_rect.size;
			}
		} else if (light_storage->light_directional_get_shadow_mode(base) == RS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS) {
			atlas_rect.size.height /= 2;
			if (p_pass == 0) {
			} else {
				atlas_rect.position.y += atlas_rect.size.height;
			}
		}
		float directional_shadow_size = light_storage->directional_shadow_get_size();
		Rect2 atlas_rect_norm = atlas_rect;
		atlas_rect_norm.position /= directional_shadow_size;