### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Win 10

### Issue description

When Autoload scripts have compile errors, the error is not printed to Output. Instead, they fail when Running with an error completely unrelated to what's wrong:

```
USER ERROR: Script does not inherit from Node: res://thetrouble.gd.
   at: start (main/main.cpp:2776)
```

There's no other information. I assume this message is because their failure to compile means they don't get associated as a Node child (related to #75388?)? But I don't understand why they don't have any errors reported. I think it only occurs if they were added to Autoload before they got compiled/used?

I am using an external editor (gvim) and godot's LSP support. That correctly shows the error, but only when I'm editing the broken file which makes it unclear what's wrong. (When I first encountered this problem, I looked at the files, saw they were extending Node2D and didn't understand the problem. It's possible the lsp was failing to show any errors, but it shows errors now.)

### Steps to reproduce

1. New project, add scene
2. Add script "thetrouble.gd"
3. Add thetrouble.gd as an Autoload
4. Add invalid code to thetrouble.gd (two variables named `seq`) 
  * **Expected**: compile error reported
  * **Actual**: No output
5. Run project
  * **Expected**: compile error reported
  * **Actual**: Script does not inherit from Node: res://thetrouble.gd.
6. Add valid code to thetrouble.gd (assign a value to `seq`) 
  * **Expected**: compile error reported
  * **Actual**: No output

Note: If you mix up steps 2 and 3, the issue will not occur.

Workaround: Edit Autoloads and disable and re-enable thetrouble's autoload state and error messages appear. New errors even appear after this point.

### Minimal reproduction project

[repro.zip](https://github.com/godotengine/godot/files/11747339/repro.zip)

return ERR_PARSE_ERROR;
	}
	GDScriptAnalyzer analyzer(&parser);
	err = analyzer.analyze();
	if (err) {
		if (EngineDebugger::is_active()) {
			GDScriptLanguage::get_singleton()->debug_break_parse(_get_debug_path(), parser.get_errors().front()->get().line, "Parser Error: " + parser.get_errors().front()->get().message);
		}
		const List<GDScriptParser::ParserError>::Element *e = parser.get_errors().front();
		while (e != nullptr) {
			_err_print_error("GDScript::reload", path.is_empty() ? "built-in" : (const char *)path.utf8().get_data(), e->get().line, ("Parse Error: " + e->get().message).utf8().get_data(), false, ERR_HANDLER_SCRIPT);
			e = e->next();
		}
		reloading = false;
		return ERR_PARSE_ERROR;
	}
	can_run = ScriptServer::is_scripting_enabled() || parser.is_tool();
	GDScriptCompiler compiler;
	err = compiler.compile(&parser, this, p_keep_state);
	if (err) {
		_err_print_error("GDScript::reload", path.is_empty() ? "built-in" : (const char *)path.utf8().get_data(), compiler.get_error_line(), ("Compile Error: " + compiler.get_error()).utf8().get_data(), false, ERR_HANDLER_SCRIPT);
		if (can_run) {
			if (EngineDebugger::is_active()) {
				GDScriptLanguage::get_singleton()->debug_break_parse(_get_debug_path(), compiler.get_error_line(), "Parser Error: " + compiler.get_error());
			}
			reloading = false;
			return ERR_COMPILATION_FAILED;
		} else {
			reloading = false;
			return err;