### Godot version

4.0rc1 gl_compatibility only.

### System information

Windows 10, Nvidia 527.56 RTX3090, gl_compatibility
OpenGL API 3.3.0 NVIDIA 527.56 - Compatibility

### Issue description

Assigning a `CanvasItemMatrial` with `blend_mode = BLEND_MODE_SUB` in opengl causes the entire editor to turn black and break, even if later unassigned.

In case it matters, I'm using Single Window Mode in the editor.

### Steps to reproduce

1. Open the attached Project. Make sure it is using **Compatibility** on the top right.
2. On the root "Level" node, click the `Use Standard` checkbox which runs the tool script (it actually sets a CanvasItemMaterial, not standard. the checkbox was badly named). The editor turns black.
3. Without moving the mouse, click again to toggle this material off and return to a ShaderMaterial. The editor is still black / broken.
4. Press Ctrl-S to save the scene so you aren't bombarded with an invisible save dialog.
5. Close the editor.

If you edit the script and try other blend_mode values, this issue does not happen.

### Minimal reproduction project

[black_screen_test.zip](https://github.com/godotengine/godot/files/10689627/black_screen_test.zip)

if (instance_uses_color || instance_uses_custom_data) {
						glEnableVertexAttribArray(5);
						glVertexAttribIPointer(5, 4, GL_UNSIGNED_INT, instance_stride * sizeof(float), CAST_INT_TO_UCHAR_PTR(instance_color_offset * sizeof(float)));
						glVertexAttribDivisor(5, 1);
					}
				}
				GLenum primitive_gl = prim[int(primitive)];
				if (use_index_buffer) {
					glDrawElementsInstanced(primitive_gl, mesh_storage->mesh_surface_get_vertices_drawn_count(surface), mesh_storage->mesh_surface_get_index_type(surface), 0, instance_count);
				} else {
					glDrawArraysInstanced(primitive_gl, 0, mesh_storage->mesh_surface_get_vertices_drawn_count(surface), instance_count);
				}
				glBindBuffer(GL_ARRAY_BUFFER, 0);
				glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
				if (instance_count > 1) {
					glDisableVertexAttribArray(5);
					glDisableVertexAttribArray(6);
					glDisableVertexAttribArray(7);
					glDisableVertexAttribArray(8);
				}
			}
		} break;
		case Item::Command::TYPE_TRANSFORM:
		case Item::Command::TYPE_CLIP_IGNORE:
		case Item::Command::TYPE_ANIMATION_SLICE: {
			
		} break;
	}
}
void RasterizerCanvasGLES3::_add_to_batch(uint32_t &r_index, bool &r_batch_broken) {