### 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
uint8_t *w = sourcef.ptrw();
	uint64_t r = f->get_buffer(w, len);
	ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
	w[len] = 0;
	String s;
	if (s.parse_utf8((const char *)w) != OK) {
		ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
	}
	source = s;
	path = p_path;
	path_valid = true;
#ifdef TOOLS_ENABLED
	source_changed_cache = true;
	set_edited(false);
	set_last_modified_time(FileAccess::get_modified_time(path));
#endif 
	return OK;
}
const HashMap<StringName, GDScriptFunction *> &GDScript::debug_get_member_functions() const {
	return member_functions;
}
StringName GDScript::debug_get_member_by_index(int p_idx) const {
	for (const KeyValue<StringName, MemberInfo> &E : member_indices) {
		if (E.value.index == p_idx) {
			return E.key;
		}
	}
	return "<error>";
}
StringName GDScript::debug_get_static_var_by_index(int p_idx) const {