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

type = FOR;
		}
	};
	struct FunctionNode : public Node {
		IdentifierNode *identifier = nullptr;
		Vector<ParameterNode *> parameters;
		HashMap<StringName, int> parameters_indices;
		TypeNode *return_type = nullptr;
		SuiteNode *body = nullptr;
		bool is_static = false;
		bool is_coroutine = false;
		Variant rpc_config;
		MethodInfo info;
		LambdaNode *source_lambda = nullptr;
#ifdef TOOLS_ENABLED
		Vector<Variant> default_arg_values;
		String doc_description;
#endif 
		bool resolved_signature = false;
		bool resolved_body = false;
		FunctionNode() {
			type = FUNCTION;
		}
	};
	struct GetNodeNode : public ExpressionNode {
		String full_path;
#ifdef DEBUG_ENABLED
		bool use_dollar = true;
#endif
		GetNodeNode() {