### 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
Vector<String> components = String(p_name).split("/", true, 2);
	if (components.size() >= 2 && components[0].begins_with("item_") && components[0].trim_prefix("item_").is_valid_int()) {
		int item_index = components[0].trim_prefix("item_").to_int();
		String property = components[1];
		if (property == "text") {
			r_ret = get_item_text(item_index);
			return true;
		} else if (property == "icon") {
			r_ret = get_item_icon(item_index);
			return true;
		} else if (property == "checkable") {
			r_ret = this->items[item_index].checkable_type;
			return true;
		} else if (property == "checked") {
			r_ret = is_item_checked(item_index);
			return true;
		} else if (property == "id") {
			r_ret = get_item_id(item_index);
			return true;
		} else if (property == "disabled") {
			r_ret = is_item_disabled(item_index);
			return true;
		} else if (property == "separator") {
			r_ret = is_item_separator(item_index);
			return true;
		}
	}
	return false;
}
void PopupMenu::_get_property_list(List<PropertyInfo> *p_list) const {