This is an error which is only applying to minecraft, and no other game. Even in the settings when I move my mouse, it is fine and stays where it should, but when playing the game, if I look around to the left for example and then stop moving the mouse, it will continue slowly moving towards the left for eternity.
I have tried disabling cinematic mode as well as trying downloading the different clients, and updating my mouse driver (Gigabyte M6900), to no avail.