### 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
Transform2D texture_transform = Transform2D(node->get_texture_rotation(), node->get_texture_offset());
	texture_transform.scale(node->get_texture_scale());
	texture_transform.affine_invert();
	RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), mtx * texture_transform);
	uv_edit_draw->draw_texture(base_tex, Point2());
	RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), Transform2D());
	if (snap_show_grid) {
		Color grid_color = Color(1.0, 1.0, 1.0, 0.15);
		Size2 s = uv_edit_draw->get_size();
		int last_cell = 0;
		if (snap_step.x != 0) {
			for (int i = 0; i < s.width; i++) {
				int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(i, 0)).x - snap_offset.x) / snap_step.x));
				if (i == 0) {
					last_cell = cell;
				}
				if (last_cell != cell) {
					uv_edit_draw->draw_line(Point2(i, 0), Point2(i, s.height), grid_color, Math::round(EDSCALE));
				}
				last_cell = cell;
			}
		}
		if (snap_step.y != 0) {
			for (int i = 0; i < s.height; i++) {
				int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(0, i)).y - snap_offset.y) / snap_step.y));
				if (i == 0) {
					last_cell = cell;
				}
				if (last_cell != cell) {
					uv_edit_draw->draw_line(Point2(0, i), Point2(s.width, i), grid_color, Math::round(EDSCALE));