This Godot 4 project reproduces an issue I found with calling the get_object() method of a signal inside an if statement expression where it returns a bool value. After that, it continues to evaluate to bool.
jhlothamer/godot4_gdscript_issue_signal_get_object_bool
Godot 4 project recreating odd issue in GDScript where Signal.get_object() evaluates to bool and not object
GDScript