### 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.
p_node->end_line = previous.end_line;
	p_node->end_column = previous.end_column;
	p_node->leftmost_column = MIN(p_node->leftmost_column, previous.leftmost_column);
	p_node->rightmost_column = MAX(p_node->rightmost_column, previous.rightmost_column);
}
void GDScriptParser::reset_extents(Node *p_node, GDScriptTokenizer::Token p_token) {
	p_node->start_line = p_token.start_line;
	p_node->end_line = p_token.end_line;
	p_node->start_column = p_token.start_column;
	p_node->end_column = p_token.end_column;
	p_node->leftmost_column = p_token.leftmost_column;
	p_node->rightmost_column = p_token.rightmost_column;
}
void GDScriptParser::reset_extents(Node *p_node, Node *p_from) {
	if (p_from == nullptr) {
		return;
	}
	p_node->start_line = p_from->start_line;
	p_node->end_line = p_from->end_line;
	p_node->start_column = p_from->start_column;
	p_node->end_column = p_from->end_column;
	p_node->leftmost_column = p_from->leftmost_column;
	p_node->rightmost_column = p_from->rightmost_column;
}
#ifdef DEBUG_ENABLED
void GDScriptParser::TreePrinter::increase_indent() {