### 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 (inst->store_transform_cache) {
			RendererRD::MaterialStorage::store_transform(inst->transform, instance_data.transform);
			RendererRD::MaterialStorage::store_transform(inst->prev_transform, instance_data.prev_transform);
		} else {
			RendererRD::MaterialStorage::store_transform(Transform3D(), instance_data.transform);
			RendererRD::MaterialStorage::store_transform(Transform3D(), instance_data.prev_transform);
		}
		instance_data.flags = inst->flags_cache;
		instance_data.gi_offset = inst->gi_offset_cache;
		instance_data.layer_mask = inst->layer_mask;
		instance_data.instance_uniforms_ofs = uint32_t(inst->shader_uniforms_offset);
		instance_data.lightmap_uv_scale[0] = inst->lightmap_uv_scale.position.x;
		instance_data.lightmap_uv_scale[1] = inst->lightmap_uv_scale.position.y;
		instance_data.lightmap_uv_scale[2] = inst->lightmap_uv_scale.size.x;
		instance_data.lightmap_uv_scale[3] = inst->lightmap_uv_scale.size.y;
#ifdef REAL_T_IS_DOUBLE
		
		
		RendererRD::MaterialStorage::split_double(inst->transform.origin.x, &instance_data.transform[12], &instance_data.transform[3]);
		RendererRD::MaterialStorage::split_double(inst->transform.origin.y, &instance_data.transform[13], &instance_data.transform[7]);
		RendererRD::MaterialStorage::split_double(inst->transform.origin.z, &instance_data.transform[14], &instance_data.transform[11]);
#endif
		bool cant_repeat = instance_data.flags & INSTANCE_DATA_FLAG_MULTIMESH || inst->mesh_instance.is_valid();
		if (prev_surface != nullptr && !cant_repeat && prev_surface->sort.sort_key1 == surface->sort.sort_key1 && prev_surface->sort.sort_key2 == surface->sort.sort_key2 && inst->mirror == prev_surface->owner->mirror && repeats < RenderElementInfo::MAX_REPEATS) {
			
			repeats++;
		} else {
			if (repeats > 0) {
				for (uint32_t j = 1; j <= repeats; j++) {