An old bug that appeared since PTR 1.33 is still not fixed.
When creating custom frames that interact with the player’s cursor (like a ScriptDialogButton for example) and registering events such as FRAMEEVENT_CONTROL_CLICK or FRAMEEVENT_MOUSE_ENTER, the cursor begins to move to another part of the screen for short periods of time when the event is triggered.
Here’s an old topic with a video FRAMEEVENT_MOUSE_ENTER breaks the frame interaction