### Godot version

v4.0.beta16.official [518b9e580]

### System information

Pop!_OS 22.04 (Ubuntu), Compatibility, HAWAII (, LLVM 14.0.0, DRM 2.50, 6.0.12-76060006-generic)

### Issue description

A 3D object with a material with `blend_mode` set to `subtract` and `transparency` set to `alpha` causes the entire editor to render completely black when the renderer is set to `compatibility`.

The editor remains completely black while the object with the material is selected. Selecting a different object fixes it, but moving the editor camera can sometimes cause the editor to return to black again.

- The `forward+` and `mobile` rendering modes work properly.
- The editor seems remains to remain fully functional apart from the rendering.
- This issue does not occur in the running game.
- I was also able to reproduce the error in 2D once, but when I tried it a second time it worked properly without the rendering error.

### Steps to reproduce

In the provided minimal project is a cube with a material added to its `material_override` property. Setting `blend_mode` to `alpha` in the material causes the entire editor to render black.

### Minimal reproduction project

[MinimalProject.zip](https://github.com/godotengine/godot/files/10552568/MinimalProject.zip)

GLES3::Config *config = GLES3::Config::get_singleton();
	if (state.shadow_fb == 0) {
		glActiveTexture(GL_TEXTURE0);
		glGenFramebuffers(1, &state.shadow_fb);
		glBindFramebuffer(GL_FRAMEBUFFER, state.shadow_fb);
		glGenRenderbuffers(1, &state.shadow_depth_buffer);
		glBindRenderbuffer(GL_RENDERBUFFER, state.shadow_depth_buffer);
		glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, state.shadow_texture_size, data.max_lights_per_render * 2);
		glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, state.shadow_depth_buffer);
		glGenTextures(1, &state.shadow_texture);
		glBindTexture(GL_TEXTURE_2D, state.shadow_texture);
		if (config->float_texture_supported) {
			glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, state.shadow_texture_size, data.max_lights_per_render * 2, 0, GL_RED, GL_FLOAT, nullptr);
		} else {
			glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, state.shadow_texture_size, data.max_lights_per_render * 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
		}
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1);
		glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, state.shadow_texture, 0);
		GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
		if (status != GL_FRAMEBUFFER_COMPLETE) {