### Godot version

4.0 beta (e1648b3327431a09cc9498663fac483275eb711d)

### System information

Mageia 9, Linux

### Issue description

When exporting a project with no attached script (or with only a builtin GDScript), the following error is printed:
```
ERROR: Can't open file from path 'res://.godot/global_script_class_cache.cfg'.
   at: get_file_as_bytes (core/io/file_access.cpp:699)
```

And while the export succeeds, when running the project, it prints:
```
ERROR: Couldn't find the given section "" and key "list", and no default was given.
   at: get_value (core/io/config_file.cpp:86)
```

We should ensure that this file is always created, regardless of whether there are scripts to parse for class names or not. It should always contain at least `list=[]`.

### Steps to reproduce

- Create new project
- Create main scene with no script
- Export

### Minimal reproduction project

[NewProj.zip](https://github.com/godotengine/godot/files/10547125/NewProj.zip)
GLOBAL_DEF_BASIC("display/window/size/resizable", true);
	GLOBAL_DEF_BASIC("display/window/size/borderless", false);
	GLOBAL_DEF("display/window/size/always_on_top", false);
	GLOBAL_DEF("display/window/size/transparent", false);
	GLOBAL_DEF("display/window/size/extend_to_title", false);
	GLOBAL_DEF("display/window/size/no_focus", false);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_width_override", PROPERTY_HINT_RANGE, "0,7680,1,or_greater"), 0); /
	GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"), 0); /
	GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
	GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor", false);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"), "res://default_bus_layout.tres");
	GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/general/2d_panning_strength", PROPERTY_HINT_RANGE, "0,2,0.01"), 0.5f);
	GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/general/3d_panning_strength", PROPERTY_HINT_RANGE, "0,2,0.01"), 0.5f);
	PackedStringArray extensions;
	extensions.push_back("gd");
	if (Engine::get_singleton()->has_singleton("GodotSharp")) {
		extensions.push_back("cs");
	}
	extensions.push_back("gdshader");
	GLOBAL_DEF("editor/run/main_run_args", "");
	GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions);
	GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates");
	/
	GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}");
	GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}");
	_add_builtin_input_map();
	/
	custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor");
	/
	custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::INT, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox");