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

line = line.replace("get_focus_owner()", "get_viewport().gui_get_focus_owner()");
	}
	// 
	if (line.contains(".pressed")) {
		int start = line.find(".pressed");
		bool foundNextEqual = false;
		String line_to_check = line.substr(start + String(".pressed").length());
		for (int current_index = 0; line_to_check.length() > current_index; current_index++) {
			char32_t chr = line_to_check.get(current_index);
			if (chr == '\t' || chr == ' ') {
				continue;
			} else if (chr == '=') {
				foundNextEqual = true;
			} else {
				break;
			}
		}
		if (foundNextEqual) {
			line = line.substr(0, start) + ".button_pressed" + line.substr(start + String(".pressed").length());
		}
	}
	// 
	if (contains_function_call(line, "rotating")) {
		int start = line.find("rotating");
		bool foundNextEqual = false;
		String line_to_check = line.substr(start + String("rotating").length());
		String assigned_value;
		for (int current_index = 0; line_to_check.length() > current_index; current_index++) {
			char32_t chr = line_to_check.get(current_index);
			if (chr == '\t' || chr == ' ') {