hateeee to do this to you but I just found out this can also be triggered from using the screenshot shortcut (windows + s) I tried mitigating this by running:
if keyboard_check_direct(91) && keyboard_check_direct(ord("S")) {
winwin_mouse_clear(window, mb_left)
}
Which stops it from happening but also prevents the screenshot shortcut from working