### 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
doc.tutorials.append(td);
	}
	doc.is_deprecated = p_class->doc_data.is_deprecated;
	doc.is_experimental = p_class->doc_data.is_experimental;
	for (const GDP::ClassNode::Member &member : p_class->members) {
		switch (member.type) {
			case GDP::ClassNode::Member::CLASS: {
				const GDP::ClassNode *inner_class = member.m_class;
				const StringName &class_name = inner_class->identifier->name;
				p_script->member_lines[class_name] = inner_class->start_line;
				
				
				GDScriptDocGen::generate_docs(*p_script->subclasses[class_name], inner_class);
			} break;
			case GDP::ClassNode::Member::CONSTANT: {
				const GDP::ConstantNode *m_const = member.constant;
				const StringName &const_name = member.constant->identifier->name;
				p_script->member_lines[const_name] = m_const->start_line;
				DocData::ConstantDoc const_doc;
				DocData::constant_doc_from_variant(const_doc, const_name, m_const->initializer->reduced_value, m_const->doc_data.description);
				const_doc.is_deprecated = m_const->doc_data.is_deprecated;
				const_doc.is_experimental = m_const->doc_data.is_experimental;
				doc.constants.push_back(const_doc);
			} break;
			case GDP::ClassNode::Member::FUNCTION: {
				const GDP::FunctionNode *m_func = member.function;
				const StringName &func_name = m_func->identifier->name;
				p_script->member_lines[func_name] = m_func->start_line;
				MethodInfo mi;
				mi.name = func_name;