### Godot version

4.0 rc6

### System information

win 11

### Issue description

UV tab

![image](https://user-images.githubusercontent.com/69117768/221976102-1b61dc27-d104-447c-9baf-bfe82c1e1790.png)

other tabs

![image](https://user-images.githubusercontent.com/69117768/221976126-09e32e2c-f63d-4728-ac56-e50d65b3ef1e.png)


### Steps to reproduce

make a polygon from a sprite

### Minimal reproduction project

n/A
}
					if (closest != -1) {
						if (polygon_create.size() && closest == polygon_create[0]) {
							/
							if (polygon_create.size() < 3) {
								error->set_text(TTR("Invalid Polygon (need 3 different vertices)"));
								error->popup_centered();
							} else {
								Array polygons = node->get_polygons();
								polygons = polygons.duplicate(); /
								/
								polygons.push_back(polygon_create);
								undo_redo->create_action(TTR("Add Custom Polygon"));
								undo_redo->add_do_method(node, "set_polygons", polygons);
								undo_redo->add_undo_method(node, "set_polygons", node->get_polygons());
								undo_redo->add_do_method(uv_edit_draw, "queue_redraw");
								undo_redo->add_undo_method(uv_edit_draw, "queue_redraw");
								undo_redo->commit_action();
							}
							polygon_create.clear();
						} else if (!polygon_create.has(closest)) {
							/
							polygon_create.push_back(closest);
						}
					}
				}
				if (uv_move_current == UV_MODE_REMOVE_POLYGON) {
					Array polygons = node->get_polygons();
					polygons = polygons.duplicate(); /
					int erase_index = -1;