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

#include "editor_plugin_settings.h"
#include "core/config/project_settings.h"
#include "core/io/config_file.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/os/main_loop.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/tree.h"
void EditorPluginSettings::_notification(int p_what) {
	switch (p_what) {
		case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
			update_plugins();
		} break;
		case Node::NOTIFICATION_READY: {
			plugin_config_dialog->connect("plugin_ready", callable_mp(EditorNode::get_singleton(), &EditorNode::_on_plugin_ready));
			plugin_list->connect("button_clicked", callable_mp(this, &EditorPluginSettings::_cell_button_pressed));
		} break;
	}
}
void EditorPluginSettings::update_plugins() {