### 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
EnumNode *enum_node = alloc_node<EnumNode>();
	bool named = false;
	if (check(GDScriptTokenizer::Token::IDENTIFIER)) {
		advance();
		enum_node->identifier = parse_identifier();
		named = true;
	}
	push_multiline(true);
	consume(GDScriptTokenizer::Token::BRACE_OPEN, vformat(R"(Expected "{" after %s.)", named ? "enum name" : R"("enum")"));
	HashMap<StringName, int> elements;
#ifdef DEBUG_ENABLED
	List<MethodInfo> gdscript_funcs;
	GDScriptLanguage::get_singleton()->get_public_functions(&gdscript_funcs);
#endif
	do {
		if (check(GDScriptTokenizer::Token::BRACE_CLOSE)) {
			break; 
		}
		if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier for enum key.)")) {
			EnumNode::Value item;
			GDScriptParser::IdentifierNode *identifier = parse_identifier();
#ifdef DEBUG_ENABLED
			if (!named) { 
				for (MethodInfo &info : gdscript_funcs) {