### Godot version

4.0.rc1

### System information

windows 10

### Issue description

When assigning a lambda to a variable right after an if statement, the parser seems to understand that a ternary expression is happening when in fact it is not.

![image](https://user-images.githubusercontent.com/5783414/218691792-a27619cd-f17c-4d1e-9121-197c22aeec09.png)

### Steps to reproduce

Put the code bellow on a script on an empty project
```gdscript
func test():
	var v
	if true: v = (func(): test())
	if true: v = (func(): test())
	if true: v = (func(): test())

	if true: v = func(): test()
	if true: v = func(): test()
```

### Minimal reproduction project

N/A
while (current.type == GDScriptTokenizer::Token::ERROR) {
		push_error(current.literal);
		current = tokenizer.scan();
	}
	for (Node *n : nodes_in_progress) {
		update_extents(n);
	}
	return previous;
}
bool GDScriptParser::match(GDScriptTokenizer::Token::Type p_token_type) {
	if (!check(p_token_type)) {
		return false;
	}
	advance();
	return true;
}
bool GDScriptParser::check(GDScriptTokenizer::Token::Type p_token_type) const {
	if (p_token_type == GDScriptTokenizer::Token::IDENTIFIER) {
		return current.is_identifier();
	}
	return current.type == p_token_type;
}
bool GDScriptParser::consume(GDScriptTokenizer::Token::Type p_token_type, const String &p_error_message) {
	if (match(p_token_type)) {
		return true;
	}
	push_error(p_error_message);
	return false;
}
bool GDScriptParser::is_at_end() const {