### 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);
bool _is_sibling_branch_selected(TreeItem *p_from) const;
	void _go_left();
	void _go_right();
	void _go_down();
	void _go_up();
	bool _scroll(bool p_horizontal, float p_pages);
protected:
	virtual void _update_theme_item_cache() override;
	static void _bind_methods();
public:
	virtual void gui_input(const Ref<InputEvent> &p_event) override;
	virtual String get_tooltip(const Point2 &p_pos) const override;
	TreeItem *get_item_at_position(const Point2 &p_pos) const;
	int get_column_at_position(const Point2 &p_pos) const;
	int get_drop_section_at_position(const Point2 &p_pos) const;
	int get_button_id_at_position(const Point2 &p_pos) const;
	void clear();
	TreeItem *create_item(TreeItem *p_parent = nullptr, int p_idx = -1);
	TreeItem *get_root() const;
	TreeItem *get_last_item() const;
	void set_column_custom_minimum_width(int p_column, int p_min_width);
	void set_column_expand(int p_column, bool p_expand);
	void set_column_expand_ratio(int p_column, int p_ratio);
	void set_column_clip_content(int p_column, bool p_fit);
	int get_column_minimum_width(int p_column) const;
	int get_column_width(int p_column) const;
	int get_column_expand_ratio(int p_column) const;
	bool is_column_expanding(int p_column) const;
	bool is_column_clipping_content(int p_column) const;
	void set_hide_root(bool p_enabled);