### 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 "GDScript";
}
void GDScriptLanguage::_add_global(const StringName &p_name, const Variant &p_value) {
	if (globals.has(p_name)) {
		
		global_array.write[globals[p_name]] = p_value;
		return;
	}
	globals[p_name] = global_array.size();
	global_array.push_back(p_value);
	_global_array = global_array.ptrw();
}
void GDScriptLanguage::add_global_constant(const StringName &p_variable, const Variant &p_value) {
	_add_global(p_variable, p_value);
}
void GDScriptLanguage::add_named_global_constant(const StringName &p_name, const Variant &p_value) {
	named_globals[p_name] = p_value;
}
Variant GDScriptLanguage::get_any_global_constant(const StringName &p_name) {
	if (named_globals.has(p_name)) {
		return named_globals[p_name];
	}
	if (globals.has(p_name)) {
		return _global_array[globals[p_name]];
	}
	ERR_FAIL_V_MSG(Variant(), vformat("Could not find any global constant with name: %s.", p_name));
}
void GDScriptLanguage::remove_named_global_constant(const StringName &p_name) {