### Godot version

v4.1.stable.official [970459615]

### System information

MacOS Big Sure 11.3

### Issue description

I got a bug report on my project and then did a deeper analysis to find the rootcause of Godot crashing on exit.
https://github.com/MikeSchulze/gdUnit4/issues/225

short story
- i removed all classes and resources step by step but still crashs at Godot exit
- finally i find out a simple print statement in the `func _exit_tree():` let the editor crash at exit.


### Steps to reproduce

Step one
- Create a new Project
- Create a new plugin over the editor provided plugin creation tool
- activate and exit ... works

Step two
- open the `plugin.gd` and add a print statement to `func _exit_tree():`

```
@tool
extends EditorPlugin


func _enter_tree():
	# Initialization of the plugin goes here.
	pass


func _exit_tree():
	prints("_exit_tree")
	# Clean-up of the plugin goes here.
	pass

```

- close/restart the editor is crashing at exit


### Minimal reproduction project

n/a
resource_conversion_plugins.push_back(p_plugin);
}
void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) {
	resource_conversion_plugins.erase(p_plugin);
}
Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
	Vector<Ref<EditorResourceConversionPlugin>> ret;
	for (int i = 0; i < resource_conversion_plugins.size(); i++) {
		if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) {
			ret.push_back(resource_conversion_plugins[i]);
		}
	}
	return ret;
}
void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) {
	top_split->set_visible(!p_pressed);
}
void EditorNode::_update_renderer_color() {
	String rendering_method = renderer->get_selected_metadata();
	if (rendering_method == "forward_plus") {
		renderer->add_theme_color_override("font_color", Color::hex(0x5d8c3fff));
	}
	if (rendering_method == "mobile") {
		renderer->add_theme_color_override("font_color", Color::hex(0xa5557dff));
	}
	if (rendering_method == "gl_compatibility") {
		renderer->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
	}
}
void EditorNode::_renderer_selected(int p_which) {