### 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)

switch (variable->property) {
					case GDScriptParser::VariableNode::PROP_NONE:
						break; 
					case GDScriptParser::VariableNode::PROP_SETGET:
						if (variable->setter_pointer != nullptr) {
							minfo.setter = variable->setter_pointer->name;
						}
						if (variable->getter_pointer != nullptr) {
							minfo.getter = variable->getter_pointer->name;
						}
						break;
					case GDScriptParser::VariableNode::PROP_INLINE:
						if (variable->setter != nullptr) {
							minfo.setter = "@" + variable->identifier->name + "_setter";
						}
						if (variable->getter != nullptr) {
							minfo.getter = "@" + variable->identifier->name + "_getter";
						}
						break;
				}
				minfo.data_type = _gdtype_from_datatype(variable->get_datatype(), p_script);
				PropertyInfo prop_info = minfo.data_type;
				prop_info.name = name;
				PropertyInfo export_info = variable->export_info;
				if (variable->exported) {
					if (!minfo.data_type.has_type) {
						prop_info.type = export_info.type;
						prop_info.class_name = export_info.class_name;
					}
					prop_info.hint = export_info.hint;