___

***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.*

___

### Godot version

v4.2.beta1.official [b1371806a]

### System information

Windows 10 - Godot v4.1.1.stable.official

### Issue description

![Lookup symbol option not available](https://github.com/godotengine/godot/assets/38583283/f5c1e4ad-236a-4954-9fed-70b9a29221e0)

Including a reference to a child node, and accessing a function on the child node works in game.
However, trying to use the "Lookup symbol" option or CTRL+LMB on the function from the script editor does not work at all.

This works fine in Godot 3.5.

Additionally, the functions defined in the child node are not suggested in auto-complete in the parent node's script.

### Steps to reproduce

1. Create a scene with a parent node and a child node (type does not matter).
    ParentNode
        ChildNode
2. Attach scripts to both nodes.
3. Define a function (say, foo) in the child node's script.
4. Reference the child node in the parent node's script (say, `@onready var child = $ChildNode`) Note: the issue only happens when onready is used.
5. Call the function foo from the child anywhere in the parent node's script.
6. Firstly, the function "foo" is not suggested in the auto-complete. Second, "lookup symbol" or "CTRL+LMB" don't open the function definition.

### Minimal reproduction project

[lookupBug.zip](https://github.com/godotengine/godot/files/12709418/lookupBug.zip)

return true;
					}
				}
				return false;
			} break;
			case GDScriptParser::DataType::BUILTIN: {
				Callable::CallError err;
				Variant tmp;
				Variant::construct(base_type.builtin_type, tmp, nullptr, 0, err);
				if (err.error != Callable::CallError::CALL_OK) {
					return false;
				}
				bool valid = false;
				Variant res = tmp.get(p_identifier, &valid);
				if (valid) {
					r_type = _type_from_variant(res);
					r_type.value = Variant();
					r_type.type.is_constant = false;
					return true;
				}
				return false;
			} break;
			default: {
				return false;
			} break;
		}
	}
	return false;
}
static void _find_last_return_in_block(GDScriptParser::CompletionContext &p_context, int &r_last_return_line, const GDScriptParser::ExpressionNode **r_last_returned_value) {