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

GDScriptCodeGenerator::Address call_base = is_static ? GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::CLASS) : GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::SELF);
					gen->write_call(GDScriptCodeGenerator::Address(), call_base, setter_function, args);
				} else if (is_static) {
					GDScriptCodeGenerator::Address temp = codegen.add_temporary(static_var_data_type);
					if (assignment->use_conversion_assign) {
						gen->write_assign_with_conversion(temp, to_assign);
					} else {
						gen->write_assign(temp, to_assign);
					}
					gen->write_set_static_variable(temp, static_var_class, static_var_index);
					gen->pop_temporary();
				} else {
					
					if (assignment->use_conversion_assign) {
						gen->write_assign_with_conversion(target, to_assign);
					} else {
						gen->write_assign(target, to_assign);
					}
				}
				if (to_assign.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
					gen->pop_temporary(); 
				}
				if (has_operation && assigned_value.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
					gen->pop_temporary(); 
				}
				if (target.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
					gen->pop_temporary(); 
				}
			}
			return GDScriptCodeGenerator::Address();