### 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
bool is_detected = false;
		while (n != common_parent) {
			if (n->is_unique_name_in_owner() && n->get_owner() == get_owner()) {
				path.push_back(UNIQUE_NODE_PREFIX + String(n->get_name()));
				is_detected = true;
				break;
			}
			path.push_back(n->get_name());
			n = n->data.parent;
		}
		if (!is_detected) {
			n = this;
			String detected_name;
			int up_count = 0;
			while (n != common_parent) {
				if (n->is_unique_name_in_owner() && n->get_owner() == get_owner()) {
					detected_name = n->get_name();
					up_count = 0;
				}
				up_count++;
				n = n->data.parent;
			}
			for (int i = 0; i < up_count; i++) {
				path.push_back(up);
			}
			if (!detected_name.is_empty()) {
				path.push_back(UNIQUE_NODE_PREFIX + detected_name);
			}
		}
	} else {