### Godot version

v4.0.beta9.mono.official [e780dc332]

### System information

Linux Mint 20.3 Cinnamon, NVIDIA Corporation TU106 [GeForce RTX 2070]

### Issue description

When calling EraseButton on a TreeItem with exactly one button, the following error occurs:

`ERROR: Index p_idx = 2 is out of bounds (cells[p_column].buttons.size() = 1).`

After investigating the cause is clear, the Erase function is taking the button id and passing it to the button array as an index. So if the first button you add has the id 0, and the second 1, and so on, the function actually works fine. Conversely if I set the button id to 99 the error says .

`ERROR: Index p_idx = 99 is out of bounds (cells[p_column].buttons.size() = 1).`

I have to assume that expecting the user to track the order that the buttons are stored in the internal array is not intentional. Should be simple enough to fix.

### Steps to reproduce


Just create a Tree with a TreeItem and then add a button to it with an id that is != 0
Then try to remove that button.

### Minimal reproduction project

c# (sorry I don't really do GDScript)

var Tree = new Tree();
var root = Tree.CreateItem();
var item = Tree.CreateItem(root);
item.AddButton(0, someRandomTexture2D, 99);
item.EraseButton(0, 99);
value_editor->set_step(c.step);
			value_editor->set_value(c.val);
			value_editor->set_exp_ratio(c.expr);
			updating_value_editor = false;
		} else {
			value_editor->hide();
		}
		popup_editor->set_position(popup_rect.position);
		popup_editor->set_size(popup_rect.size);
		popup_editor->popup();
		popup_editor->child_controls_changed();
		text_editor->grab_focus();
		return true;
	}
	return false;
}
bool Tree::is_editing() {
	return popup_editor->is_visible();
}
Size2 Tree::get_internal_min_size() const {
	Size2i size = theme_cache.panel_style->get_offset();
	if (root) {
		size.height += get_item_height(root);
	}
	for (int i = 0; i < columns.size(); i++) {
		size.width += get_column_minimum_width(i);
	}
	return size;
}
void Tree::update_scrollbars() {