### 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);
TreeItem *get_item_with_text(const String &p_find) const;
	Point2 get_scroll() const;
	void scroll_to_item(TreeItem *p_item, bool p_center_on_item = false);
	void set_h_scroll_enabled(bool p_enable);
	bool is_h_scroll_enabled() const;
	void set_v_scroll_enabled(bool p_enable);
	bool is_v_scroll_enabled() const;
	void set_cursor_can_exit_tree(bool p_enable);
	VScrollBar *get_vscroll_bar() { return v_scroll; }
	void set_hide_folding(bool p_hide);
	bool is_folding_hidden() const;
	void set_enable_recursive_folding(bool p_enable);
	bool is_recursive_folding_enabled() const;
	void set_drop_mode_flags(int p_flags);
	int get_drop_mode_flags() const;
	void set_edit_checkbox_cell_only_when_checkbox_is_pressed(bool p_enable);
	bool get_edit_checkbox_cell_only_when_checkbox_is_pressed() const;
	void set_allow_rmb_select(bool p_allow);
	bool get_allow_rmb_select() const;
	void set_allow_reselect(bool p_allow);
	bool get_allow_reselect() const;
	Size2 get_minimum_size() const override;
	Tree();
	~Tree();
};
VARIANT_ENUM_CAST(Tree::SelectMode);
VARIANT_ENUM_CAST(Tree::DropModeFlags);
#endif