### Godot version

v4.1.beta2.official [a2575cba4]

### System information

Godot v4.1.beta2 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.3141) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)

### Issue description

With the latest 4.1.beta2 static variables will now raise an error in console and log. No crash, only a error:
```
USER ERROR: Condition "p_elem->_root != this" is true.
   at: remove (./core/templates/self_list.h:80)
```
I don't know if pull #78138 has anything to do with it?

Anyway, if `static` keyword will removed, the error is gone.

### Steps to reproduce

Pretty simple:

Make a new scene, attach a new script and copy/paste this:

```GDScript
extends Node2D

static var my_static_int: int = 0

func _ready() -> void:
	pass
```

Run scene and close it.

### Minimal reproduction project

N/A
#ifdef TOOLS_ENABLED
	HashMap<StringName, Variant>::ConstIterator E = member_default_values_cache.find(p_property);
	if (E) {
		r_value = E->value;
		return true;
	}
	if (base_cache.is_valid()) {
		return base_cache->get_property_default_value(p_property, r_value);
	}
#endif
	return false;
}
ScriptInstance *GDScript::instance_create(Object *p_this) {
	GDScript *top = this;
	while (top->_base) {
		top = top->_base;
	}
	if (top->native.is_valid()) {
		if (!ClassDB::is_parent_class(p_this->get_class_name(), top->native->get_name())) {
			if (EngineDebugger::is_active()) {
				GDScriptLanguage::get_singleton()->debug_break_parse(_get_debug_path(), 1, "Script inherits from native type '" + String(top->native->get_name()) + "', so it can't be assigned to an object of type: '" + p_this->get_class() + "'");
			}
			ERR_FAIL_V_MSG(nullptr, "Script inherits from native type '" + String(top->native->get_name()) + "', so it can't be assigned to an object of type '" + p_this->get_class() + "'" + ".");
		}
	}
	Callable::CallError unchecked_error;
	return _create_instance(nullptr, 0, p_this, Object::cast_to<RefCounted>(p_this) != nullptr, unchecked_error);
}
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {