### 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
}
				if (p_render_data->scene_data->cam_orthogonal) {
					distance = 1.0;
				}
				uint32_t indices = 0;
				surf->sort.lod_index = mesh_storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->scene_data->lod_distance_multiplier, p_render_data->scene_data->screen_mesh_lod_threshold, indices);
				if (p_render_data->render_info) {
					indices = _indices_to_primitives(surf->primitive, indices);
					if (p_render_list == RENDER_LIST_OPAQUE) { 
						p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += indices;
					} else if (p_render_list == RENDER_LIST_SECONDARY) { 
						p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_SHADOW][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += indices;
					}
				}
			} else {
				surf->sort.lod_index = 0;
				if (p_render_data->render_info) {
					uint32_t to_draw = mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface);
					to_draw = _indices_to_primitives(surf->primitive, to_draw);
					to_draw *= inst->instance_count;
					if (p_render_list == RENDER_LIST_OPAQUE) { 
						p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface);
					} else if (p_render_list == RENDER_LIST_SECONDARY) { 
						p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_SHADOW][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface);
					}
				}
			}
			
			if (p_pass_mode == PASS_MODE_COLOR) {
#ifdef DEBUG_ENABLED