### Godot version

4.1.1

### System information

Windows 11 - Godot 4.1.1

### Issue description

Using EditorPlugin.make_mesh_previews() crashes Godot. 
The MRP contains a minimal EditorPlugin.

### Steps to reproduce

```
@tool
extends EditorPlugin
 
func _ready():

	var _mesh = preload("res://box.tres")

	var _mesh_arr : Array[Mesh]
	_mesh_arr.append(_mesh)

	var _2d_array : Array[Texture2D] = get_editor_interface().make_mesh_previews(_mesh_arr, 128)

```
### Minimal reproduction project

[MakeMeshPreview.zip](https://github.com/godotengine/godot/files/12269663/MakeMeshPreview.zip)

Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
	Error err = da->change_dir(p_dir);
	if (err != OK) {
		return Vector<String>();
	}
	Vector<String> plugins;
	da->list_dir_begin();
	for (String path = da->get_next(); !path.is_empty(); path = da->get_next()) {
		if (path[0] == '.' || !da->current_is_dir()) {
			continue;
		}
		const String full_path = p_dir.path_join(path);
		const String plugin_config = full_path.path_join("plugin.cfg");
		if (FileAccess::exists(plugin_config)) {
			plugins.push_back(plugin_config);
		} else {
			plugins.append_array(_get_plugins(full_path));
		}
	}
	da->list_dir_end();
	return plugins;
}
void EditorPluginSettings::_bind_methods() {