### 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
} 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;
		atlas_rect_norm.size /= directional_shadow_size;
		light_storage->light_instance_set_directional_shadow_atlas_rect(p_light, p_pass, atlas_rect_norm);
		zfar = RSG::light_storage->light_get_param(base, RS::LIGHT_PARAM_RANGE);
		render_fb = light_storage->direction_shadow_get_fb();
		render_texture = RID();
		flip_y = true;
	} else {
		
		ERR_FAIL_COND(!light_storage->owns_shadow_atlas(p_shadow_atlas));
		ERR_FAIL_COND(!light_storage->shadow_atlas_owns_light_instance(p_shadow_atlas, p_light));
		RSG::light_storage->shadow_atlas_update(p_shadow_atlas);
		uint32_t key = light_storage->shadow_atlas_get_light_instance_key(p_shadow_atlas, p_light);
		uint32_t quadrant = (key >> RendererRD::LightStorage::QUADRANT_SHIFT) & 0x3;
		uint32_t shadow = key & RendererRD::LightStorage::SHADOW_INDEX_MASK;
		uint32_t subdivision = light_storage->shadow_atlas_get_quadrant_subdivision(p_shadow_atlas, quadrant);
		ERR_FAIL_INDEX((int)shadow, light_storage->shadow_atlas_get_quadrant_shadow_size(p_shadow_atlas, quadrant));
		uint32_t shadow_atlas_size = light_storage->shadow_atlas_get_size(p_shadow_atlas);
		uint32_t quadrant_size = shadow_atlas_size >> 1;
		atlas_rect.position.x = (quadrant & 1) * quadrant_size;
		atlas_rect.position.y = (quadrant >> 1) * quadrant_size;
		uint32_t shadow_size = (quadrant_size / subdivision);
		atlas_rect.position.x += (shadow % subdivision) * shadow_size;
		atlas_rect.position.y += (shadow / subdivision) * shadow_size;