### Godot version

ef025711a

### System information

ArchLinux x11

### Issue description

Accessing a scene unique node like this:
```gdscript
class_name Class extends Node
static func get_label() -> Label:
	return %label
```
and then accessing that class later:
```gdscript
func _ready() -> void:
	Main.get_label().text = "hello world"
```
causes a strange error when in the editor, and a normal error when run directly.
![image](https://user-images.githubusercontent.com/70787919/229785642-6aad4e31-6bd9-4eb5-bee4-7445b48a99bb.png)
```c++
ERROR: Node not found: "%label" (relative to "/root/main").
   at: get_node (scene/main/node.cpp:1364)
```
Instead of returning null.
As opposed to when using `get_node`:
```

SCRIPT ERROR: Cannot call method 'get_node' on a null value.
          at: get_label (res://main.gd:5)
SCRIPT ERROR: Invalid set index 'text' (on base: 'Nil') with value of type 'String'.
          at: _ready (res://control.gd:4)
```

### Steps to reproduce

Run mrp or follow outlined steps

### Minimal reproduction project

[bug.zip](https://github.com/godotengine/godot/files/11148287/bug.zip)

}
	}
}
void GDScriptAnalyzer::reduce_unary_op(GDScriptParser::UnaryOpNode *p_unary_op) {
	reduce_expression(p_unary_op->operand);
	GDScriptParser::DataType result;
	if (p_unary_op->operand == nullptr) {
		result.kind = GDScriptParser::DataType::VARIANT;
		p_unary_op->set_datatype(result);
		return;
	}
	GDScriptParser::DataType operand_type = p_unary_op->operand->get_datatype();
	if (p_unary_op->operand->is_constant) {
		p_unary_op->is_constant = true;
		p_unary_op->reduced_value = Variant::evaluate(p_unary_op->variant_op, p_unary_op->operand->reduced_value, Variant());
		result = type_from_variant(p_unary_op->reduced_value, p_unary_op);
	}
	if (operand_type.is_variant()) {
		result.kind = GDScriptParser::DataType::VARIANT;
		mark_node_unsafe(p_unary_op);
	} else {
		bool valid = false;
		result = get_operation_type(p_unary_op->variant_op, operand_type, valid, p_unary_op);
		if (!valid) {
			push_error(vformat(R"(Invalid operand of type "%s" for unary operator "%s".)", operand_type.to_string(), Variant::get_operator_name(p_unary_op->variant_op)), p_unary_op);
		}
	}
	p_unary_op->set_datatype(result);
}
Variant GDScriptAnalyzer::make_expression_reduced_value(GDScriptParser::ExpressionNode *p_expression, bool &is_reduced) {