### 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.
if (parameter->initializer != nullptr) {
				default_used = true;
			} else {
				if (default_used) {
					push_error("Cannot have a mandatory parameters after optional parameters.");
					continue;
				}
			}
			if (p_function->parameters_indices.has(parameter->identifier->name)) {
				push_error(vformat(R"(Parameter with name "%s" was already declared for this %s.)", parameter->identifier->name, p_type));
			} else {
				p_function->parameters_indices[parameter->identifier->name] = p_function->parameters.size();
				p_function->parameters.push_back(parameter);
				p_body->add_local(parameter, current_function);
			}
		} while (match(GDScriptTokenizer::Token::COMMA));
	}
	pop_multiline();
	consume(GDScriptTokenizer::Token::PARENTHESIS_CLOSE, vformat(R"*(Expected closing ")" after %s parameters.)*", p_type));
	if (match(GDScriptTokenizer::Token::FORWARD_ARROW)) {
		make_completion_context(COMPLETION_TYPE_NAME_OR_VOID, p_function);
		p_function->return_type = parse_type(true);
		if (p_function->return_type == nullptr) {
			push_error(R"(Expected return type or "void" after "->".)");
		}
	}
	
	consume(GDScriptTokenizer::Token::COLON, vformat(R"(Expected ":" after %s declaration.)", p_type));
}
GDScriptParser::FunctionNode *GDScriptParser::parse_function() {