### Godot version

v4.0.beta13.official [caacade56]

### System information

Windows 8.1

### Issue description

The `Unreachable code (statement after return) in function 'function_name()'` warning is given for functions that do not have unreachable code. The same code does not give this warning in v3.5.stable.official [991bb6ac7].

### Steps to reproduce

```
func warning(i: int) -> void:
  if i == 0:
    pass
  elif i == 1:
    return
  else:
    return
  print("yeah")
```

Removing either the `elif` or the `else` removes the warning.

### Minimal reproduction project

N/A; code in reproduction steps can be placed in any blank gdscript file to trigger the error.
break;
		}
		String doc_line = comments[line].comment.trim_prefix("##");
		in_codeblock = _in_codeblock(doc_line, in_codeblock, &codeblock_begins);
		if (in_codeblock) {
			int i = 0;
			for (; i < codeblock_begins; i++) {
				if (doc_line[i] != ' ') {
					break;
				}
			}
			doc_line = doc_line.substr(i);
		} else {
			doc_line = doc_line.strip_edges();
		}
		String line_join = (in_codeblock) ? "\n" : " ";
		doc = (doc.is_empty()) ? doc_line : doc + line_join + doc_line;
		line++;
	}
	return doc;
}
void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &p_desc, Vector<Pair<String, String>> &p_tutorials, bool p_inner_class) {
	const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments();
	if (!comments.has(p_line)) {
		return;
	}
	ERR_FAIL_COND(!p_brief.is_empty() || !p_desc.is_empty() || p_tutorials.size() != 0);
	int line = p_line;
	bool in_codeblock = false;
	enum Mode {