### 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)

const Color *color_ptr = p_colors.ptr();
			for (uint32_t i = 0; i < vertex_count; i++) {
				fptr[base_offset + i * stride + 0] = color_ptr[i].r;
				fptr[base_offset + i * stride + 1] = color_ptr[i].g;
				fptr[base_offset + i * stride + 2] = color_ptr[i].b;
				fptr[base_offset + i * stride + 3] = color_ptr[i].a;
			}
			base_offset += 4;
		} else {
			glDisableVertexAttribArray(RS::ARRAY_COLOR);
			pb.color_disabled = true;
			pb.color = p_colors.size() == 1 ? p_colors[0] : Color(1.0, 1.0, 1.0, 1.0);
		}
		if ((uint32_t)p_uvs.size() == vertex_count) {
			glEnableVertexAttribArray(RS::ARRAY_TEX_UV);
			glVertexAttribPointer(RS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, stride * sizeof(float), CAST_INT_TO_UCHAR_PTR(base_offset * sizeof(float)));
			const Vector2 *uv_ptr = p_uvs.ptr();
			for (uint32_t i = 0; i < vertex_count; i++) {
				fptr[base_offset + i * stride + 0] = uv_ptr[i].x;
				fptr[base_offset + i * stride + 1] = uv_ptr[i].y;
			}
			base_offset += 2;
		} else {
			glDisableVertexAttribArray(RS::ARRAY_TEX_UV);
		}
		if ((uint32_t)p_indices.size() == vertex_count * 4 && (uint32_t)p_weights.size() == vertex_count * 4) {
			glEnableVertexAttribArray(RS::ARRAY_BONES);
			glVertexAttribPointer(RS::ARRAY_BONES, 4, GL_UNSIGNED_INT, GL_FALSE, stride * sizeof(float), CAST_INT_TO_UCHAR_PTR(base_offset * sizeof(float)));
			const int *bone_ptr = p_bones.ptr();
			for (uint32_t i = 0; i < vertex_count; i++) {