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

while (light) {
			if (light->render_index_cache >= 0 && p_item->light_mask & light->item_mask && p_item->z_final >= light->z_min && p_item->z_final <= light->z_max && p_item->global_rect_cache.intersects_transformed(light->xform_cache, light->rect_cache)) {
				uint32_t light_index = light->render_index_cache;
				lights[light_count >> 2] |= light_index << ((light_count & 3) * 8);
				light_count++;
				if (light_count == data.max_lights_per_item - 1) {
					break;
				}
			}
			light = light->next_ptr;
		}
		base_flags |= light_count << FLAGS_LIGHT_COUNT_SHIFT;
	}
	bool lights_disabled = light_count == 0 && !state.using_directional_lights;
	if (lights_disabled != state.canvas_instance_batches[state.current_batch_index].lights_disabled) {
		_new_batch(r_batch_broken);
		state.canvas_instance_batches[state.current_batch_index].lights_disabled = lights_disabled;
	}
	const Item::Command *c = p_item->commands;
	while (c) {
		if (skipping && c->type != Item::Command::TYPE_ANIMATION_SLICE) {
			c = c->next;
			continue;
		}
		if (c->type != Item::Command::TYPE_MESH) {
			
			_update_transform_2d_to_mat2x3(base_transform * draw_transform, state.instance_data_array[r_index].world);
		}
		
		for (int i = 0; i < 4; i++) {