### Godot version

4.0 RC 3

### System information

Macbook m1

### Issue description

If I normally use:
```
Skeleton2D.new()
```

if works.

If I use:
```
@export_group("Skeleton2D")
...
Skeleton2D.new()
```

I get error: `Invalid call. Nonexistent function 'new' in base 'Nil'.`

### Steps to reproduce

- Run a script where you have `@export_group` with same name as a node class name that you use `.new()` on.

```
extends Node2D
class_name Test

@export_group("Skeleton2D")

# Called when the node enters the scene tree for the first time.
func _ready():
	var skeleton = Skeleton2D.new()


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	pass
```

### Minimal reproduction project

[BugNew.zip](https://github.com/godotengine/godot/files/10818936/BugNew.zip)

_FORCE_INLINE_ bool is_resolving() const { return kind == RESOLVING; }
		_FORCE_INLINE_ bool has_no_type() const { return type_source == UNDETECTED; }
		_FORCE_INLINE_ bool is_variant() const { return kind == VARIANT || kind == RESOLVING || kind == UNRESOLVED; }
		_FORCE_INLINE_ bool is_hard_type() const { return type_source > INFERRED; }
		String to_string() const;
		_FORCE_INLINE_ void set_container_element_type(const DataType &p_type) {
			container_element_type = memnew(DataType(p_type));
		}
		_FORCE_INLINE_ DataType get_container_element_type() const {
			ERR_FAIL_COND_V(container_element_type == nullptr, DataType());
			return *container_element_type;
		}
		_FORCE_INLINE_ bool has_container_element_type() const {
			return container_element_type != nullptr;
		}
		_FORCE_INLINE_ void unset_container_element_type() {
			if (container_element_type) {
				memdelete(container_element_type);
			};
			container_element_type = nullptr;
		}
		bool is_typed_container_type() const;
		GDScriptParser::DataType get_typed_container_type() const;
		bool operator==(const DataType &p_other) const {