### 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)
Ref<Resource> r = ResourceCache::get_ref(file);
		if (r.is_valid()) {
			if (!r->get_import_path().is_empty()) {
				String dst_path = ResourceFormatImporter::get_singleton()->get_internal_resource_path(file);
				r->set_import_path(dst_path);
				r->set_import_last_modified_time(0);
			}
		}
		EditorResourcePreview::get_singleton()->check_for_invalidation(file);
	}
	return err;
}
void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options, const String &p_custom_importer) {
	EditorFileSystemDirectory *fs = nullptr;
	int cpos = -1;
	bool found = _find_file(p_file, &fs, cpos);
	ERR_FAIL_COND_MSG(!found, "Can't find file '" + p_file + "'.");
	
	HashMap<StringName, Variant> params;
	String importer_name; 
	if (!p_custom_importer.is_empty()) {
		importer_name = p_custom_importer;
	}
	if (p_custom_options != nullptr) {
		params = *p_custom_options;
	}
	ResourceUID::ID uid = ResourceUID::INVALID_ID;
	if (FileAccess::exists(p_file + ".import")) {
		
		if (p_custom_options == nullptr) {