### Godot version

v4.1.stable.mono

### System information

Windows 11

### Issue description

The automated build system I set up (via Gitlab CI/CD) for exporting my game is no longer working in 4.1.

The `.pck` file generated during export is orders of magnitude smaller than I'd expect, and the game doesn't get past the first frame of the splash screen due to the lack of resources. I've noticed the `savepack` part of the export process seems to skip some steps...
```
savepack: begin: Packing steps: 102
        savepack: step 2: Storing File: res://build/springdash.ico
        savepack: step 102: Storing File: res://.godot/global_script_class_cache.cfg
        savepack: step 102: Storing File: res://icons/spring_dash.png
        savepack: step 102: Storing File: res://.godot/uid_cache.bin
        savepack: step 102: Storing File: res://project.binary
```

Exporting through the UI works as expected, but exporting via CLI (e.g. via something like `godot4 --export-release windows-64bit export/test.exe`) results in the issue described above.

### Steps to reproduce

- Setup a basic project that relies on some resources (e.g. an image) in Godot 4.1 (or use the one provided)
- Export via the UI and notice that it works
- Export via the CLI and notice that it doesn't, and the `.pck` file is either not present or much smaller than expected

### Minimal reproduction project

[export-cli.zip](https://github.com/godotengine/godot/files/11983031/export-cli.zip)

f->store_line("importer_version=" + itos(version));
			}
			if (!importer->get_resource_type().is_empty()) {
				f->store_line("type=\"" + importer->get_resource_type() + "\"");
			}
			if (uid == ResourceUID::INVALID_ID) {
				uid = ResourceUID::get_singleton()->create_id();
			}
			f->store_line("uid=\"" + ResourceUID::get_singleton()->id_to_text(uid) + "\""); 
			if (err == OK) {
				String path = base_path + "." + importer->get_save_extension();
				f->store_line("path=\"" + path + "\"");
				dest_paths.push_back(path);
			}
			f->store_line("group_file=" + Variant(p_group_file).get_construct_string());
			if (err == OK) {
				f->store_line("valid=true");
			} else {
				f->store_line("valid=false");
			}
			f->store_line("[deps]\n");
			f->store_line("");
			f->store_line("source_file=" + Variant(file).get_construct_string());
			if (dest_paths.size()) {
				Array dp;
				for (int i = 0; i < dest_paths.size(); i++) {
					dp.push_back(dest_paths[i]);
				}
				f->store_line("dest_files=" + Variant(dp).get_construct_string() + "\n");
			}