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

overview_vbox->add_child(buttons_hbox);
	filename = memnew(Label);
	filename->set_clip_text(true);
	filename->set_h_size_flags(SIZE_EXPAND_FILL);
	filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
	buttons_hbox->add_child(filename);
	members_overview_alphabeta_sort_button = memnew(Button);
	members_overview_alphabeta_sort_button->set_flat(true);
	members_overview_alphabeta_sort_button->set_tooltip_text(TTR("Toggle alphabetical sorting of the method list."));
	members_overview_alphabeta_sort_button->set_toggle_mode(true);
	members_overview_alphabeta_sort_button->set_pressed(EDITOR_GET("text_editor/script_list/sort_members_outline_alphabetically"));
	members_overview_alphabeta_sort_button->connect("toggled", callable_mp(this, &ScriptEditor::_toggle_members_overview_alpha_sort));
	buttons_hbox->add_child(members_overview_alphabeta_sort_button);
	filter_methods = memnew(LineEdit);
	filter_methods->set_placeholder(TTR("Filter Methods"));
	filter_methods->set_clear_button_enabled(true);
	filter_methods->connect("text_changed", callable_mp(this, &ScriptEditor::_filter_methods_text_changed));
	overview_vbox->add_child(filter_methods);
	members_overview = memnew(ItemList);
	overview_vbox->add_child(members_overview);
	members_overview->set_allow_reselect(true);
	members_overview->set_custom_minimum_size(Size2(0, 60) * EDSCALE); 
	members_overview->set_v_size_flags(SIZE_EXPAND_FILL);
	members_overview->set_allow_rmb_select(true);
	help_overview = memnew(ItemList);
	overview_vbox->add_child(help_overview);
	help_overview->set_allow_reselect(true);
	help_overview->set_custom_minimum_size(Size2(0, 60) * EDSCALE); 
	help_overview->set_v_size_flags(SIZE_EXPAND_FILL);
	VBoxContainer *code_editor_container = memnew(VBoxContainer);