### Godot version

4.0 RC1

### System information

Linux Mint 20.3 Cinnamon

### Issue description

Tried converting a 3.5 game to 4.0 RC1. The conversion popup menu closed after a few seconds, and trying to edit the game crashes the entire engine with the following errors, which seem to be related to one music file not loading:
![errors](https://user-images.githubusercontent.com/125468288/219127087-f5a78035-4e4a-4625-aadb-e0cde6d5ac3d.png)

Not sure what's causing the issue, because when I created a new project with only that file and converted it I didn't get these errors, but consistently get them when trying to convert that game.

### Steps to reproduce

- Download the reproduction project below
- Import in Godot 4.0, and click "convert full project"
- If the bug happens, the engine will crash whenever trying to edit or run the converted project

### Minimal reproduction project

[Music Convertor Crash Demo.zip](https://github.com/godotengine/godot/files/10746591/Music.Convertor.Crash.Demo.zip)

ERR_FAIL_COND_V_MSG(!FileAccess::exists("project.godot"), false, "Current working directory doesn't contain a \"project.godot\" file for a Godot 3 project.");
		Error err = OK;
		String project_godot_content = FileAccess::get_file_as_string("project.godot", &err);
		ERR_FAIL_COND_V_MSG(err != OK, false, "Unable to read \"project.godot\".");
		ERR_FAIL_COND_V_MSG(project_godot_content.contains(converter_text), false, "Project was already converted with this tool.");
		Ref<FileAccess> file = FileAccess::open("project.godot", FileAccess::WRITE);
		ERR_FAIL_COND_V_MSG(file.is_null(), false, "Unable to open \"project.godot\".");
		file->store_string(converter_text + "\n" + project_godot_content);
	}
	Vector<String> collected_files = check_for_files();
	uint32_t converted_files = 0;
	
	for (int i = 0; i < collected_files.size(); i++) {
		String file_name = collected_files[i];
		Vector<SourceLine> source_lines;
		uint32_t ignored_lines = 0;
		{
			Ref<FileAccess> file = FileAccess::open(file_name, FileAccess::READ);
			ERR_CONTINUE_MSG(file.is_null(), vformat("Unable to read content of \"%s\".", file_name));
			while (!file->eof_reached()) {
				String line = file->get_line();
				SourceLine source_line;
				source_line.line = line;
				source_line.is_comment = reg_container.gdscript_comment.search_all(line).size() > 0 || reg_container.csharp_comment.search_all(line).size() > 0;
				source_lines.append(source_line);
			}
		}
		String file_content_before = collect_string_from_vector(source_lines);
		uint64_t hash_before = file_content_before.hash();
		uint64_t file_size = file_content_before.size();