### 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);
Size2 get_internal_min_size() const;
	void update_scrollbars();
	Rect2 search_item_rect(TreeItem *p_from, TreeItem *p_item);
	
	uint64_t last_keypress = 0;
	String incr_search;
	bool cursor_can_exit_tree = true;
	void _do_incr_search(const String &p_add);
	TreeItem *_search_item_text(TreeItem *p_at, const String &p_find, int *r_col, bool p_selectable, bool p_backwards = false);
	TreeItem *_find_item_at_pos(TreeItem *p_item, const Point2 &p_pos, int &r_column, int &h, int &section) const;
	/*	float drag_speed;
	float drag_accum;
	float last_drag_accum;
	float last_drag_time;
	float time_since_motion;*/
	float drag_speed = 0.0;
	float drag_from = 0.0;
	float drag_accum = 0.0;
	Vector2 last_speed;
	bool drag_touching = false;
	bool drag_touching_deaccel = false;
	bool click_handled = false;
	bool allow_rmb_select = false;
	bool scrolling = false;
	bool allow_reselect = false;
	bool force_edit_checkbox_only_on_checkbox = false;
	bool hide_folding = false;
	bool enable_recursive_folding = true;
	int _count_selected_items(TreeItem *p_from) const;
	bool _is_branch_selected(TreeItem *p_from) const;