### 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
AnnotationNode *annotation = alloc_node<AnnotationNode>();
	annotation->name = previous.literal;
	make_completion_context(COMPLETION_ANNOTATION, annotation);
	bool valid = true;
	if (!valid_annotations.has(annotation->name)) {
		push_error(vformat(R"(Unrecognized annotation: "%s".)", annotation->name));
		valid = false;
	}
	annotation->info = &valid_annotations[annotation->name];
	if (!annotation->applies_to(p_valid_targets)) {
		if (annotation->applies_to(AnnotationInfo::SCRIPT)) {
			push_error(vformat(R"(Annotation "%s" must be at the top of the script, before "extends" and "class_name".)", annotation->name));
		} else {
			push_error(vformat(R"(Annotation "%s" is not allowed in this level.)", annotation->name));
		}
		valid = false;
	}
	if (check(GDScriptTokenizer::Token::PARENTHESIS_OPEN)) {
		push_multiline(true);
		advance();
		
		push_completion_call(annotation);
		make_completion_context(COMPLETION_ANNOTATION_ARGUMENTS, annotation, 0, true);
		int argument_index = 0;
		do {
			if (check(GDScriptTokenizer::Token::PARENTHESIS_CLOSE)) {
				
				break;
			}
			make_completion_context(COMPLETION_ANNOTATION_ARGUMENTS, annotation, argument_index, true);