As you said, a function similar to copyCamera should be used.
I found a method called CopyCamera, and the code is as follows:
const camera = this.renderer.getActiveCamera();
this.paintRenderer.setActiveCamera(cloneDeep(camera));
CloneDeep is a function of the lodash plugin.
I tried deleting the updateCamera method, and the handle and line of lineWidget were displayed.
But it is far away from the position of the mouse cursor, and the handle moves faster than the mouse cursor.
UpdateCamera only applies to circleWidget, ellipseWidget, and rectangleWidget.
It has been confirmed that the problem lies in updateCamera. In this case, after using functions similar to copyCamera, the next step should be to adjust the offset. I don’t know if my understanding is correct?
Thank you very much for your patience in recovering.