### 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
permission_args++;
				rpc_config["rpc_mode"] = MultiplayerAPI::RPC_MODE_ANY_PEER;
			} else if (arg == "authority") {
				permission_args++;
				rpc_config["rpc_mode"] = MultiplayerAPI::RPC_MODE_AUTHORITY;
			} else if (arg == "reliable") {
				transfer_mode_args++;
				rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
			} else if (arg == "unreliable") {
				transfer_mode_args++;
				rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE;
			} else if (arg == "unreliable_ordered") {
				transfer_mode_args++;
				rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE_ORDERED;
			} else {
				push_error(R"(Invalid RPC argument. Must be one of: "call_local"/"call_remote" (local calls), "any_peer"/"authority" (permission), "reliable"/"unreliable"/"unreliable_ordered" (transfer mode).)", p_annotation);
			}
		}
		if (locality_args > 1) {
			push_error(R"(Invalid RPC config. The locality ("call_local"/"call_remote") must be specified no more than once.)", p_annotation);
		} else if (permission_args > 1) {
			push_error(R"(Invalid RPC config. The permission ("any_peer"/"authority") must be specified no more than once.)", p_annotation);
		} else if (transfer_mode_args > 1) {
			push_error(R"(Invalid RPC config. The transfer mode ("reliable"/"unreliable"/"unreliable_ordered") must be specified no more than once.)", p_annotation);
		}
	}
	function->rpc_config = rpc_config;
	return true;
}
bool GDScriptParser::static_unload_annotation(const AnnotationNode *p_annotation, Node *p_target) {