### 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
const Vector2 *rv = points_prev.ptr();
					for (int i = 0; i < pc; i++) {
						if (mtx.xform(rv[i]).distance_to(bone_paint_pos) < radius) {
							w[i] = CLAMP(r[i] + amount, 0, 1);
						}
					}
				}
				node->set_bone_weights(bone_painting_bone, painted_weights);
			}
			uv_edit_draw->queue_redraw();
			CanvasItemEditor::get_singleton()->update_viewport();
		} else if (polygon_create.size()) {
			uv_create_to = mtx.affine_inverse().xform(mm->get_position());
			uv_edit_draw->queue_redraw();
		} else if (uv_mode == UV_MODE_PAINT_WEIGHT || uv_mode == UV_MODE_CLEAR_WEIGHT) {
			bone_paint_pos = mm->get_position();
			uv_edit_draw->queue_redraw();
		}
	}
	Ref<InputEventMagnifyGesture> magnify_gesture = p_input;
	if (magnify_gesture.is_valid()) {
		uv_zoom->set_value(uv_zoom->get_value() * magnify_gesture->get_factor());
	}
	Ref<InputEventPanGesture> pan_gesture = p_input;
	if (pan_gesture.is_valid()) {
		uv_hscroll->set_value(uv_hscroll->get_value() + uv_hscroll->get_page() * pan_gesture->get_delta().x / 8);
		uv_vscroll->set_value(uv_vscroll->get_value() + uv_vscroll->get_page() * pan_gesture->get_delta().y / 8);
	}
}
void Polygon2DEditor::_uv_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {