### 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);
Ref<Texture2D> arrow_collapsed_mirrored;
		Ref<Texture2D> select_arrow;
		Ref<Texture2D> updown;
		Color font_color;
		Color font_selected_color;
		Color guide_color;
		Color drop_position_color;
		Color relationship_line_color;
		Color parent_hl_line_color;
		Color children_hl_line_color;
		Color custom_button_font_highlight;
		Color font_outline_color;
		float base_scale = 1.0;
		int h_separation = 0;
		int v_separation = 0;
		int item_margin = 0;
		int button_margin = 0;
		Point2 offset;
		int draw_relationship_lines = 0;
		int relationship_line_width = 0;
		int parent_hl_line_width = 0;
		int children_hl_line_width = 0;
		int parent_hl_line_margin = 0;
		int draw_guides = 0;
		int scroll_border = 0;
		int scroll_speed = 0;
		int font_outline_size = 0;
	} theme_cache;
	struct Cache {
		enum ClickType {