I have this problem as a new player. Thanks for looking into it.

For me it seems to be related to UI boxes, such as the invisible box around a corpse on the ground. The cursor can get stuck inside...