### 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
while (subclass) {
			if (subclass->extends_used) {
				if (!subclass->extends_path.is_empty()) {
					if (subclass->extends.size() == 0) {
						get_global_class_name(subclass->extends_path, r_base_type);
						subclass = nullptr;
						break;
					} else {
						Vector<GDScriptParser::IdentifierNode *> extend_classes = subclass->extends;
						Ref<FileAccess> subfile = FileAccess::open(subclass->extends_path, FileAccess::READ);
						if (subfile.is_null()) {
							break;
						}
						String subsource = subfile->get_as_utf8_string();
						if (subsource.is_empty()) {
							break;
						}
						String subpath = subclass->extends_path;
						if (subpath.is_relative_path()) {
							subpath = path.get_base_dir().path_join(subpath).simplify_path();
						}
						if (OK != subparser.parse(subsource, subpath, false)) {
							break;
						}
						path = subpath;
						subclass = subparser.get_tree();
						while (extend_classes.size() > 0) {
							bool found = false;
							for (int i = 0; i < subclass->members.size(); i++) {
								if (subclass->members[i].type != GDScriptParser::ClassNode::Member::CLASS) {