### 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
_post_prepass_render(p_render_data, using_sdfgi || using_voxelgi);
		}
		RD::get_singleton()->draw_command_begin_label("Render Depth Pre-Pass");
		RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_OPAQUE, nullptr, RID());
		bool finish_depth = using_ssao || using_sdfgi || using_voxelgi;
		RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].element_info.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, depth_pass_mode, 0, rb_data.is_null(), p_render_data->directional_light_soft_shadows, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), p_render_data->scene_data->lod_distance_multiplier, p_render_data->scene_data->screen_mesh_lod_threshold, p_render_data->scene_data->view_count);
		_render_list_with_threads(&render_list_params, depth_framebuffer, needs_pre_resolve ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, needs_pre_resolve ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_CLEAR, finish_depth ? RD::FINAL_ACTION_READ : RD::FINAL_ACTION_CONTINUE, needs_pre_resolve ? Vector<Color>() : depth_pass_clear);
		RD::get_singleton()->draw_command_end_label();
		if (needs_pre_resolve) {
			_pre_resolve_render(p_render_data, using_sdfgi || using_voxelgi);
		}
		if (rb->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) {
			RENDER_TIMESTAMP("Resolve Depth Pre-Pass (MSAA)");
			RD::get_singleton()->draw_command_begin_label("Resolve Depth Pre-Pass (MSAA)");
			if (depth_pass_mode == PASS_MODE_DEPTH_NORMAL_ROUGHNESS || depth_pass_mode == PASS_MODE_DEPTH_NORMAL_ROUGHNESS_VOXEL_GI) {
				if (needs_pre_resolve) {
					RD::get_singleton()->barrier(RD::BARRIER_MASK_RASTER, RD::BARRIER_MASK_COMPUTE);
				}
				for (uint32_t v = 0; v < rb->get_view_count(); v++) {
					resolve_effects->resolve_gi(rb_data->get_depth_msaa(v), rb_data->get_normal_roughness_msaa(v), using_voxelgi ? rb_data->get_voxelgi_msaa(v) : RID(), rb->get_depth_texture(v), rb_data->get_normal_roughness(v), using_voxelgi ? rb_data->get_voxelgi(v) : RID(), rb->get_internal_size(), texture_multisamples[rb->get_msaa_3d()]);
				}
			} else if (finish_depth) {
				for (uint32_t v = 0; v < rb->get_view_count(); v++) {
					resolve_effects->resolve_depth(rb_data->get_depth_msaa(v), rb->get_depth_texture(v), rb->get_internal_size(), texture_multisamples[rb->get_msaa_3d()]);
				}
			}
			RD::get_singleton()->draw_command_end_label();
		}
		continue_depth = !finish_depth;