### Godot version

v4.0.beta.custom_build [96f12040c]

### System information

Windows 11/64, RTX 3070, Vulkan

### Issue description

From beta10 to the current master, depth prepass is broken. 

Alpha
![image](https://user-images.githubusercontent.com/632766/210395481-1eb4a6be-da4e-423f-a169-65a4b08b9411.png)

Depth Prepass
![image](https://user-images.githubusercontent.com/632766/210395511-7bb2058c-0784-46de-a582-c4d911fc8d88.png)

Alpha
![image](https://user-images.githubusercontent.com/632766/210395568-d168d393-6681-488f-b7d7-b1d58e7728ed.png)

Depth Prepass `depth_prepass_alpha`
![image](https://user-images.githubusercontent.com/632766/210395630-c9a11673-52c1-45c2-890d-29d4330f1cda.png)


Depth Prepass Beta 10
![image](https://user-images.githubusercontent.com/632766/210395836-e1c2be64-378c-4bb0-ac81-a3e9b7e7685a.png)


Note that the shadows render fine, as does vertex animation.

I also get a lot of vulkan errors that I don't get in b10. Many repeats of these on load, but not continuous:

```
ERROR: Condition "!named_textures.has(key)" is true. Returning: RID()
   at: get_texture_slice (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:357)
ERROR: Texture (binding: 0, index 0) is not a valid texture.
   at: (drivers/vulkan/rendering_device_vulkan.cpp:5465)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: compute_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7807)
ERROR: Uniforms were never supplied for set (0) at the time of drawing, which are required by the pipeline
   at: (drivers/vulkan/rendering_device_vulkan.cpp:8006)
ERROR: Condition "!rt" is true. Returning: RID()
   at: render_target_get_override_depth_slice (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:2688)

```

I'm bisecting now....

### Steps to reproduce

See MRP. Change alpha on the tree.

### Minimal reproduction project

You can use my demo from #63675
https://github.com/godotengine/godot/files/10256553/test_zorder.zip
}
		if (needs_pre_resolve) {
			
			RD::get_singleton()->draw_list_begin(depth_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_CONTINUE, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_CONTINUE, depth_pass_clear);
			RD::get_singleton()->draw_list_end();
			
			_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.is_valid() && 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()]);