### 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.
pattern->bind = parse_identifier();
			PatternNode *root_pattern = p_root_pattern == nullptr ? pattern : p_root_pattern;
			if (p_root_pattern != nullptr) {
				if (p_root_pattern->has_bind(pattern->bind->name)) {
					push_error(vformat(R"(Bind variable name "%s" was already used in this pattern.)", pattern->bind->name));
					complete_extents(pattern);
					return nullptr;
				}
			}
			if (current_suite->has_local(pattern->bind->name)) {
				push_error(vformat(R"(There's already a %s named "%s" in this scope.)", current_suite->get_local(pattern->bind->name).get_name(), pattern->bind->name));
				complete_extents(pattern);
				return nullptr;
			}
			root_pattern->binds[pattern->bind->name] = pattern->bind;
		} break;
		case GDScriptTokenizer::Token::UNDERSCORE:
			
			advance();
			pattern->pattern_type = PatternNode::PT_WILDCARD;
			break;
		case GDScriptTokenizer::Token::PERIOD_PERIOD:
			
			advance();
			pattern->pattern_type = PatternNode::PT_REST;
			break;
		case GDScriptTokenizer::Token::BRACKET_OPEN: {
			
			advance();
			pattern->pattern_type = PatternNode::PT_ARRAY;