### Godot version

4.1 dev

### System information

Win 10

### Issue description

Have a node and bunch of child nodes.
Some get _ready called, and some do not.

### Steps to reproduce

create a scene and bunch of child nodes with different sripts.

### Minimal reproduction project

n/a
ERR_THREAD_GUARD_V(false);
	if (!has_node(p_path)) {
		return false;
	}
	Ref<Resource> res;
	Vector<StringName> leftover_path;
	Node *node = get_node_and_resource(p_path, res, leftover_path, false);
	return node;
}
Array Node::_get_node_and_resource(const NodePath &p_path) {
	Ref<Resource> res;
	Vector<StringName> leftover_path;
	Node *node = get_node_and_resource(p_path, res, leftover_path, false);
	Array result;
	if (node) {
		result.push_back(node);
	} else {
		result.push_back(Variant());
	}
	if (res.is_valid()) {
		result.push_back(res);
	} else {
		result.push_back(Variant());
	}
	result.push_back(NodePath(Vector<StringName>(), leftover_path, false));
	return result;
}
Node *Node::get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property) const {