### 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_doc.value = String(Variant(val.value));
					const_doc.is_value_valid = true;
					const_doc.enumeration = name;
					const_doc.description = val.doc_data.description;
					const_doc.is_deprecated = val.doc_data.is_deprecated;
					const_doc.is_experimental = val.doc_data.is_experimental;
					doc.constants.push_back(const_doc);
				}
			} break;
			case GDP::ClassNode::Member::ENUM_VALUE: {
				const GDP::EnumNode::Value &m_enum_val = member.enum_value;
				const StringName &name = m_enum_val.identifier->name;
				p_script->member_lines[name] = m_enum_val.identifier->start_line;
				DocData::ConstantDoc const_doc;
				DocData::constant_doc_from_variant(const_doc, name, m_enum_val.value, m_enum_val.doc_data.description);
				const_doc.enumeration = "@unnamed_enums";
				const_doc.is_deprecated = m_enum_val.doc_data.is_deprecated;
				const_doc.is_experimental = m_enum_val.doc_data.is_experimental;
				doc.constants.push_back(const_doc);
			} break;
			case GDP::ClassNode::Member::GROUP:
			case GDP::ClassNode::Member::UNDEFINED:
			default:
				break;
		}
	}
	
	p_script->_add_doc(doc);
}