### Godot version

4.0 beta 12 mono

### System information

MacOS 13.1, Apple M1 Pro

### Issue description

When `text_editor/external/use_external_editor` is set to true but `text_editor/external/exec_path` is not set and I create a new script and attach it to a node Godot freezes and i need to force quit the application.
Also after a restart when double clicking on the script the application freezes but I can quit normally

### Steps to reproduce

- Set Use External Editor to true in Editor Settings and leave Exec Path empty
- Create a new project with Moblie Renderer and Git Versioning in Godot
- Create a 3D Scene
- Create a gd script in the FileSystem inspector or directly attach the script to a node

### Minimal reproduction project

[New Game Project.zip](https://github.com/godotengine/godot/files/10420510/New.Game.Project.zip)

autosave_timer = memnew(Timer);
	autosave_timer->set_one_shot(false);
	autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &ScriptEditor::_update_autosave_timer));
	autosave_timer->connect("timeout", callable_mp(this, &ScriptEditor::_autosave_scripts));
	add_child(autosave_timer);
	grab_focus_block = false;
	help_search_dialog = memnew(EditorHelpSearch);
	add_child(help_search_dialog);
	help_search_dialog->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
	find_in_files_dialog = memnew(FindInFilesDialog);
	find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files).bind(false));
	find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files).bind(true));
	add_child(find_in_files_dialog);
	find_in_files = memnew(FindInFilesPanel);
	find_in_files_button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Search Results"), find_in_files);
	find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
	find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, callable_mp(this, &ScriptEditor::_on_find_in_files_result_selected));
	find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, callable_mp(this, &ScriptEditor::_on_find_in_files_modified_files));
	find_in_files->hide();
	find_in_files_button->hide();
	history_pos = -1;
	edit_pass = 0;
	trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
	convert_indent_on_save = EDITOR_GET("text_editor/behavior/files/convert_indent_on_save");
	use_space_indentation = EDITOR_GET("text_editor/behavior/indent/type");
	ScriptServer::edit_request_func = _open_script_request;
	add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
	tab_container->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditor"), SNAME("EditorStyles")));
}
ScriptEditor::~ScriptEditor() {