there is no interaction with the widget

I have a widget in my game, but there is no interaction when interacting, the UI is in the world as an actor


Here is the code:

(the camera is transferred to the widget, but there is no interaction with its buttons, etc.)

To interact you need widget interaction component.

and if I want to interact with the mouse and not the sight?

You need to call Set Custom Hit Result using Get Hit Result Under Cursor by Channel.
In the component settings you also need to set Interaction Source to Custom.