### 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
set_last_completion_call_arg(argument_index++);
			ExpressionNode *argument = parse_expression(false);
			if (argument == nullptr) {
				push_error("Expected expression as the annotation argument.");
				valid = false;
				continue;
			}
			annotation->arguments.push_back(argument);
		} while (match(GDScriptTokenizer::Token::COMMA) && !is_at_end());
		pop_multiline();
		consume(GDScriptTokenizer::Token::PARENTHESIS_CLOSE, R"*(Expected ")" after annotation arguments.)*");
		pop_completion_call();
	}
	complete_extents(annotation);
	match(GDScriptTokenizer::Token::NEWLINE); 
	if (valid) {
		valid = validate_annotation_arguments(annotation);
	}
	return valid ? annotation : nullptr;
}
void GDScriptParser::clear_unused_annotations() {
	for (const AnnotationNode *annotation : annotation_stack) {
		push_error(vformat(R"(Annotation "%s" does not precede a valid target, so it will have no effect.)", annotation->name), annotation);
	}
	annotation_stack.clear();
}
bool GDScriptParser::register_annotation(const MethodInfo &p_info, uint32_t p_target_kinds, AnnotationAction p_apply, const Vector<Variant> &p_default_arguments, bool p_is_vararg) {
	ERR_FAIL_COND_V_MSG(valid_annotations.has(p_info.name), false, vformat(R"(Annotation "%s" already registered.)", p_info.name));
	AnnotationInfo new_annotation;
	new_annotation.info = p_info;