@dae The problem apparently originates from the call to mapFromGlobal at line 1555: https://github.com/ankitects/anki/blob/main/qt/aqt/editor.py#L1555. Changing that to something like:
evt_pos = evt.position()
cursor_pos = QPoint(int(evt_pos.x()), int(evt_pos.y()))
seems to fix the problem