### Godot version

4.0.2

### System information

Windows 11

### Issue description

Changing node type from PopupMenu to ItemList causes Godot to crash

### Steps to reproduce

Change node type from PopupMenu to ItemList

### Minimal reproduction project

n/a
hide_on_multistate_item_selection = p_enabled;
}
bool PopupMenu::is_hide_on_multistate_item_selection() const {
	return hide_on_multistate_item_selection;
}
void PopupMenu::set_submenu_popup_delay(float p_time) {
	if (p_time <= 0) {
		p_time = 0.01;
	}
	submenu_timer->set_wait_time(p_time);
}
float PopupMenu::get_submenu_popup_delay() const {
	return submenu_timer->get_wait_time();
}
void PopupMenu::set_allow_search(bool p_allow) {
	allow_search = p_allow;
}
bool PopupMenu::get_allow_search() const {
	return allow_search;
}
String PopupMenu::get_tooltip(const Point2 &p_pos) const {
	int over = _get_mouse_over(p_pos);
	if (over < 0 || over >= items.size()) {
		return "";
	}
	return items[over].tooltip;
}
void PopupMenu::set_parent_rect(const Rect2 &p_rect) {