### 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.
this->_is_tool = true;
	return true;
}
bool GDScriptParser::icon_annotation(const AnnotationNode *p_annotation, Node *p_node) {
	ERR_FAIL_COND_V_MSG(p_node->type != Node::CLASS, false, R"("@icon" annotation can only be applied to classes.)");
	ERR_FAIL_COND_V(p_annotation->resolved_arguments.is_empty(), false);
	ClassNode *p_class = static_cast<ClassNode *>(p_node);
	p_class->icon_path = p_annotation->resolved_arguments[0];
	return true;
}
bool GDScriptParser::onready_annotation(const AnnotationNode *p_annotation, Node *p_node) {
	ERR_FAIL_COND_V_MSG(p_node->type != Node::VARIABLE, false, R"("@onready" annotation can only be applied to class variables.)");
	if (head && !ClassDB::is_parent_class(head->get_datatype().native_type, SNAME("Node"))) {
		push_error(R"("@onready" can only be used in classes that inherit "Node".)", p_annotation);
	}
	VariableNode *variable = static_cast<VariableNode *>(p_node);
	if (variable->onready) {
		push_error(R"("@onready" annotation can only be used once per variable.)");
		return false;
	}
	variable->onready = true;
	current_class->onready_used = true;
	return true;
}
template <PropertyHint t_hint, Variant::Type t_type>
bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node *p_node) {