### 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
for (uint32_t i = 0; i < sample_count; i++) {
			Vector2 xi = hammersley(i, sample_count);
			Vector3 dir = importance_sample_GGX(xi, roughness4);
			Vector3 light_vec = (2.0 * dir.z * dir - Vector3(0.0, 0.0, 1.0));
			if (light_vec.z < 0.0) {
				continue;
			}
			sample_directions[index * 4] = light_vec.x;
			sample_directions[index * 4 + 1] = light_vec.y;
			sample_directions[index * 4 + 2] = light_vec.z;
			float D = distribution_GGX(dir.z, roughness4);
			float pdf = D * dir.z / (4.0 * dir.z) + 0.0001;
			float solid_angle_sample = 1.0 / (float(sample_count) * pdf + 0.0001);
			float mip_level = MAX(0.5 * log2(solid_angle_sample / solid_angle_texel) + float(MAX(1, p_base_layer - 3)), 1.0);
			sample_directions[index * 4 + 3] = mip_level;
			weight += light_vec.z;
			index++;
		}
		glUniform4fv(material_storage->shaders.cubemap_filter_shader.version_get_uniform(CubemapFilterShaderGLES3::SAMPLE_DIRECTIONS_MIP, scene_globals.cubemap_filter_shader_version, mode), sample_count, sample_directions.ptr());
		material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::WEIGHT, weight, scene_globals.cubemap_filter_shader_version, mode);
		material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::SAMPLE_COUNT, index, scene_globals.cubemap_filter_shader_version, mode);
	}
	for (int i = 0; i < 6; i++) {
		glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, p_sky->radiance, p_base_layer);
#ifdef DEBUG_ENABLED
		GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
		if (status != GL_FRAMEBUFFER_COMPLETE) {
			WARN_PRINT("Could not bind sky radiance face: " + itos(i) + ", status: " + GLES3::TextureStorage::get_singleton()->get_framebuffer_error(status));
		}
#endif