### 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(0);
	int count = 0;
	for (const KeyValue<StringName, GroupData> &E : data.grouped) {
		if (E.value.persistent) {
			count += 1;
		}
	}
	return count;
}
void Node::_print_tree_pretty(const String &prefix, const bool last) {
	String new_prefix = last ? String::utf8(" ┖╴") : String::utf8(" ┠╴");
	print_line(prefix + new_prefix + String(get_name()));
	_update_children_cache();
	for (uint32_t i = 0; i < data.children_cache.size(); i++) {
		new_prefix = last ? String::utf8("   ") : String::utf8(" ┃ ");
		data.children_cache[i]->_print_tree_pretty(prefix + new_prefix, i == data.children_cache.size() - 1);
	}
}
void Node::print_tree_pretty() {
	_print_tree_pretty("", true);
}
void Node::print_tree() {
	_print_tree(this);
}
void Node::_print_tree(const Node *p_node) {