You don't have the Emacs manuals installed?!
7890yuiop
Interesting. I'm still just guessing, but I notice that you're using relative line numbers which means that there's a potential difference between the amount of space needed to show the relative line number vs the absolute line number, and that might explain the shift in display. Can you reproduce this when using absolute line numbers? If not, that seems to narrow down the trigger scenario, which will be helpful information for an upstream bug report.
My guess is that the "drag" detection is a side-effect of this:
the whole buffer shifts to the left like a single pixel
as it's conceivable that this means the positions of the click and release are "different" even if you didn't actually move the mouse.
So that maybe explains the end result, but not the actual trigger.
I'm just speculating though.
I don't know, but it might help to check C-h l
to see which sequence of mouse events Emacs is reporting in each case.
I think you need to define your requirements in more detail. What if you call magit-status while using Magit? Does that change what the "previous window configuration" should be? (I suspect it does, in which case it's not going to be "the previous window configuration" that you want). If I'm correct, you should clarify exactly which window configuration you want to restore, and when (in which specific circumstances) that should be captured.
I use sticky modifier keys at the OS level. No need for any Emacs config, and I get the benefit in every program.
I suggest reinstalling Emacs, as your install sounds kinda broken. That file should not be missing, and I'd guess it's not the only one.