### 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);
Color get_icon_modulate(int p_column) const;
	void set_icon_max_width(int p_column, int p_max);
	int get_icon_max_width(int p_column) const;
	void add_button(int p_column, const Ref<Texture2D> &p_button, int p_id = -1, bool p_disabled = false, const String &p_tooltip = "");
	int get_button_count(int p_column) const;
	String get_button_tooltip_text(int p_column, int p_idx) const;
	Ref<Texture2D> get_button(int p_column, int p_idx) const;
	int get_button_id(int p_column, int p_idx) const;
	void erase_button(int p_column, int p_idx);
	int get_button_by_id(int p_column, int p_id) const;
	void set_button(int p_column, int p_idx, const Ref<Texture2D> &p_button);
	void set_button_color(int p_column, int p_idx, const Color &p_color);
	void set_button_disabled(int p_column, int p_idx, bool p_disabled);
	bool is_button_disabled(int p_column, int p_idx) const;
	
	void set_range(int p_column, double p_value);
	double get_range(int p_column) const;
	void set_range_config(int p_column, double p_min, double p_max, double p_step, bool p_exp = false);
	void get_range_config(int p_column, double &r_min, double &r_max, double &r_step) const;
	bool is_range_exponential(int p_column) const;
	void set_metadata(int p_column, const Variant &p_meta);
	Variant get_metadata(int p_column) const;
	void set_custom_draw(int p_column, Object *p_object, const StringName &p_callback);
	void set_collapsed(bool p_collapsed);
	bool is_collapsed();
	void set_collapsed_recursive(bool p_collapsed);
	bool is_any_collapsed(bool p_only_visible = false);
	void set_visible(bool p_visible);
	bool is_visible();
	void uncollapse_tree();