### Godot version

4.1.stable

### System information

Linux 5.10.181-2-MANJARO

### Issue description

A class with a function defined like this:

```gdscript
class_name Foo extends Node

func my_func(arr: Array[int]) -> Array[int]:
	return arr

```

Will show up in the docs as:

![image](https://github.com/godotengine/godot/assets/9107253/a4b2f5a5-beab-4c8f-9a1f-dab39ea3ea6e)

Whereas i'd expect it to show up as
```
Array[int] my_func(arr: Array[int])
```

The same seems to be true for properties.

### Steps to reproduce

1. Add script
```gdscript
class_name Foo extends Node

func my_func(arr: Array[int]) -> Array[int]:
	return arr
```
2. open class `Foo` in help

### Minimal reproduction project

N/A
const GDP::ClassNode *curr_class = &p_class;
	if (!curr_class->identifier) { 
		return _get_script_path(curr_class->fqcn);
	}
	String full_name = curr_class->identifier->name;
	while (curr_class->outer) {
		curr_class = curr_class->outer;
		if (!curr_class->identifier) { 
			return vformat("%s.%s", _get_script_path(curr_class->fqcn), full_name);
		}
		full_name = vformat("%s.%s", curr_class->identifier->name, full_name);
	}
	return full_name;
}
static PropertyInfo _property_info_from_datatype(const GDType &p_type) {
	PropertyInfo pi;
	pi.type = p_type.builtin_type;
	if (p_type.kind == GDType::CLASS) {
		pi.class_name = _get_class_name(*p_type.class_type);
	} else if (p_type.kind == GDType::ENUM && p_type.enum_type != StringName()) {
		pi.type = Variant::INT; 
		pi.usage |= PROPERTY_USAGE_CLASS_IS_ENUM;
		
		pi.class_name = String(p_type.native_type).replace("::", ".");
	} else if (p_type.kind == GDType::NATIVE) {
		pi.class_name = p_type.native_type;
	}
	return pi;
}
void GDScriptDocGen::generate_docs(GDScript *p_script, const GDP::ClassNode *p_class) {