### Godot version

4.0.2

### System information

Windows 10,Radeon RX 550/550 Series,23.3.2,Vulkan

### Issue description

After Switching to the animations tabs and pressing the key symbol because I wanted to know what it does, Godot crashes

### Steps to reproduce

Go into a project 
Switch to the Animations Tab, make sure no animation is active 
And then press on the key symbol

here is a video demonstrating the bug

https://user-images.githubusercontent.com/59411880/233839816-5489899e-828f-4ac9-9de3-7914f727f754.mp4



### Minimal reproduction project

The File
[package.zip](https://github.com/godotengine/godot/files/11303712/package.zip)

}
	if (state.has("primary_grid_steps")) {
		primary_grid_steps = state["primary_grid_steps"];
	}
	if (state.has("snap_rotation_step")) {
		snap_rotation_step = state["snap_rotation_step"];
	}
	if (state.has("snap_rotation_offset")) {
		snap_rotation_offset = state["snap_rotation_offset"];
	}
	if (state.has("snap_scale_step")) {
		snap_scale_step = state["snap_scale_step"];
	}
	if (state.has("smart_snap_active")) {
		smart_snap_active = state["smart_snap_active"];
		smart_snap_button->set_pressed(smart_snap_active);
	}
	if (state.has("grid_snap_active")) {
		grid_snap_active = state["grid_snap_active"];
		grid_snap_button->set_pressed(grid_snap_active);
	}
	if (state.has("snap_node_parent")) {
		snap_node_parent = state["snap_node_parent"];
		int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_PARENT);
		smartsnap_config_popup->set_item_checked(idx, snap_node_parent);
	}
	if (state.has("snap_node_anchors")) {
		snap_node_anchors = state["snap_node_anchors"];
		int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_ANCHORS);
		smartsnap_config_popup->set_item_checked(idx, snap_node_anchors);