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

if (line.contains("window_minimized")) {
		// 
		line = reg_container.reg_os_set_minimized.sub(line, "get_window().mode = Window.MODE_MINIMIZED if ($1) else Window.MODE_WINDOWED", true);
		// 
		line = reg_container.reg_os_assign_minimized.sub(line, "get_window().mode = Window.MODE_MINIMIZED if ($1) else Window.MODE_WINDOWED", true);
		// 
		line = reg_container.reg_os_is_minimized.sub(line, "(get_window().mode == Window.MODE_MINIMIZED)", true);
	}
	if (line.contains("set_use_vsync")) {
		// 
		line = reg_container.reg_os_set_vsync.sub(line, "DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if ($1) else DisplayServer.VSYNC_DISABLED)", true);
	}
	if (line.contains("vsync_enabled")) {
		// 
		line = reg_container.reg_os_assign_vsync.sub(line, "DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if ($1) else DisplayServer.VSYNC_DISABLED)", true);
		// 
		line = reg_container.reg_os_is_vsync.sub(line, "(DisplayServer.window_get_vsync_mode() != DisplayServer.VSYNC_DISABLED)", true);
	}
	if (line.contains("OS.screen_orientation")) { // 
		// 
		line = reg_container.reg_os_assign_screen_orient.sub(line, "$1DisplayServer.screen_set_orientation($2)", true); // 
		line = line.replace("OS.screen_orientation", "DisplayServer.screen_get_orientation()"); // 
	}
	if (line.contains("_window_always_on_top")) {
		// 
		line = reg_container.reg_os_set_always_on_top.sub(line, "get_window().always_on_top = ($1)", true);
		// 
		line = reg_container.reg_os_is_always_on_top.sub(line, "get_window().always_on_top", true);
	}
	if (line.contains("et_borderless_window")) {