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

highlighter->add_keyword_color(info.name, usertype_color);
		}
	}
	const Ref<Script> scr = _get_edited_resource();
	if (scr.is_valid()) {
		
		const Color basetype_color = EDITOR_GET("text_editor/theme/highlighting/base_type_color");
		List<String> core_types;
		scr->get_language()->get_core_type_words(&core_types);
		for (const String &E : core_types) {
			highlighter->add_keyword_color(E, basetype_color);
		}
		
		const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
		const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
		List<String> keywords;
		scr->get_language()->get_reserved_words(&keywords);
		for (const String &E : keywords) {
			if (scr->get_language()->is_control_flow_keyword(E)) {
				highlighter->add_keyword_color(E, control_flow_keyword_color);
			} else {
				highlighter->add_keyword_color(E, keyword_color);
			}
		}
		
		const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
		StringName instance_base = scr->get_instance_base_type();
		if (instance_base != StringName()) {
			List<PropertyInfo> plist;
			ClassDB::get_property_list(instance_base, &plist);