### Godot version

4.0 8a98110

### System information

Windows 10 x64

### Issue description

I have a method call in my script that has changed in some newer version. Whenever I want to open the project in the new version, the autoload script will spam argument error. Forever.

https://user-images.githubusercontent.com/2223172/210169561-1938b0f9-684e-4a8f-bebd-4900ff48b98a.mp4

The project never loads. It works fine after I fix the method in external editor.

### Steps to reproduce

1. Be me
2. Try to open the project :<

### Minimal reproduction project

I wasn't able to reproduce it in a minimal project. I suspect some dependency being at fault.
r_error = OK;
	if (singleton->full_gdscript_cache.has(p_path)) {
		script = singleton->full_gdscript_cache[p_path];
		if (!p_update_from_disk) {
			return script;
		}
	}
	if (script.is_null()) {
		script = get_shallow_script(p_path, r_error);
		if (r_error) {
			return script;
		}
	}
	if (p_update_from_disk) {
		r_error = script->load_source_code(p_path);
	}
	if (r_error) {
		return script;
	}
	singleton->full_gdscript_cache[p_path] = script;
	singleton->shallow_gdscript_cache.erase(p_path);
	r_error = script->reload(true);
	if (r_error) {
		singleton->shallow_gdscript_cache[p_path] = script;
		singleton->full_gdscript_cache.erase(p_path);
		return script;
	}
	return script;
}
Ref<GDScript> GDScriptCache::get_cached_script(const String &p_path) {