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

Vector<GDScriptCodeGenerator::Address> typeof_args;
			typeof_args.push_back(expr_addr);
			codegen.generator->write_call_utility(expr_type_addr, "typeof", typeof_args);
			
			codegen.generator->write_binary_operator(result_addr, Variant::OP_EQUAL, p_type_addr, expr_type_addr);
			
			codegen.generator->write_binary_operator(stringy_comp_addr, Variant::OP_EQUAL, p_type_addr, type_string_addr);
			codegen.generator->write_binary_operator(stringy_comp_addr_2, Variant::OP_EQUAL, expr_type_addr, type_stringname_addr);
			codegen.generator->write_binary_operator(stringy_comp_addr, Variant::OP_AND, stringy_comp_addr, stringy_comp_addr_2);
			codegen.generator->write_binary_operator(result_addr, Variant::OP_OR, result_addr, stringy_comp_addr);
			
			codegen.generator->write_binary_operator(stringy_comp_addr, Variant::OP_EQUAL, p_type_addr, type_stringname_addr);
			codegen.generator->write_binary_operator(stringy_comp_addr_2, Variant::OP_EQUAL, expr_type_addr, type_string_addr);
			codegen.generator->write_binary_operator(stringy_comp_addr, Variant::OP_AND, stringy_comp_addr, stringy_comp_addr_2);
			codegen.generator->write_binary_operator(result_addr, Variant::OP_OR, result_addr, stringy_comp_addr);
			codegen.generator->pop_temporary(); 
			codegen.generator->pop_temporary(); 
			codegen.generator->pop_temporary(); 
			codegen.generator->write_and_left_operand(result_addr);
			
			codegen.generator->write_binary_operator(equality_test_addr, Variant::OP_EQUAL, p_value_addr, expr_addr);
			codegen.generator->write_and_right_operand(equality_test_addr);
			
			codegen.generator->write_end_and(result_addr);
			
			if (expr_addr.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
				codegen.generator->pop_temporary();
			}
			codegen.generator->pop_temporary();