### Godot version

v4.2.rc.mono.custom_build [ad72de508]

### System information

Windows 10

### Issue description

As I pointed out several times earlier in [#80284](https://github.com/godotengine/godot/pull/80284#issuecomment-1722120503), the references to singletons in `GDScript` are still not updated after the `GDExtension` reload.

https://github.com/godotengine/godot/assets/7782218/f90052a5-0de2-4310-8235-f0b9e2f74b3a

Singletons themselves are updated and work correctly, but references to these singletons are not updated in `@tool` scripts. That is, `Engine.get_singleton` returns the actual working reference, but using the singleton directly through its name causes errors.

### Steps to reproduce

* Clone `4.2.reload_singleton` branch from the MRP repository https://github.com/DmitriySalnikov/gde_test_cases/tree/4.2.reload_singleton
* Build as usual
* Open the project from the `project/` folder
* Add one character to the source code and rebuild
* Focus on the editor to reload extension
* Watch for error spam when calling by singleton name

### Minimal reproduction project

https://github.com/DmitriySalnikov/gde_test_cases/tree/4.2.reload_singleton
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;