### 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
p_script->_clear_doc();
	DocData::ClassDoc &doc = p_script->doc;
	doc.script_path = _get_script_path(p_script->get_script_path());
	if (p_script->name.is_empty()) {
		doc.name = doc.script_path;
	} else {
		doc.name = p_script->name;
	}
	if (p_script->_owner) {
		doc.name = p_script->_owner->doc.name + "." + doc.name;
		doc.script_path = doc.script_path + "." + doc.name;
	}
	doc.is_script_doc = true;
	if (p_script->base.is_valid() && p_script->base->is_valid()) {
		if (!p_script->base->doc.name.is_empty()) {
			doc.inherits = p_script->base->doc.name;
		} else {
			doc.inherits = p_script->base->get_instance_base_type();
		}
	} else if (p_script->native.is_valid()) {
		doc.inherits = p_script->native->get_name();
	}
	doc.brief_description = p_class->doc_data.brief;
	doc.description = p_class->doc_data.description;
	for (const Pair<String, String> &p : p_class->doc_data.tutorials) {
		DocData::TutorialDoc td;
		td.title = p.first;
		td.link = p.second;