### Godot version

v4.0.3.stable.official [5222a99f5]
Master [6101240231600c871f5c5473872532c68ea3268c] (confirmed by https://github.com/godotengine/godot/issues/77666#issuecomment-1568952502)

### System information

Window 10

### Issue description

References are not unreferenced at the end of `if` scopes.

### Steps to reproduce

Copy, paste and run the snippet below, check the results:

```gdscript
extends Node


func _ready() -> void:
  var ref := RefCounted.new()
  var ref_count : int

  # OK
  ref_count = ref.get_reference_count()
  print('Expected: 1, Result: %d' % ref_count)

  # OK
  if true:
    var temp := ref
    temp = null

  ref_count = ref.get_reference_count()
  print('Expected: 1, Result: %d' % ref_count)

  # FAIL
  if true:
    var temp := ref

  ref_count = ref.get_reference_count()
  print('Expected: 1, Result: %d' % ref_count)
```

Output example:

```
Expected: 1, Result: 1
Expected: 1, Result: 1
Expected: 1, Result: 2
```

### Minimal reproduction project

N/A
}
	push_multiline(true); 
	if (function->identifier) {
		consume(GDScriptTokenizer::Token::PARENTHESIS_OPEN, R"(Expected opening "(" after lambda name.)");
	} else {
		consume(GDScriptTokenizer::Token::PARENTHESIS_OPEN, R"(Expected opening "(" after "func".)");
	}
	FunctionNode *previous_function = current_function;
	current_function = function;
	SuiteNode *body = alloc_node<SuiteNode>();
	body->parent_function = current_function;
	body->parent_block = current_suite;
	SuiteNode *previous_suite = current_suite;
	current_suite = body;
	parse_function_signature(function, body, "lambda");
	current_suite = previous_suite;
	bool previous_in_lambda = in_lambda;
	in_lambda = true;
	
	bool could_break = can_break;
	bool could_continue = can_continue;
	
	can_break = false;
	can_continue = false;
	function->body = parse_suite("lambda declaration", body, true);
	complete_extents(function);
	complete_extents(lambda);
	pop_multiline();
	if (multiline_context) {