You really need a new keyboard.
I doubt that it is the keyboard.
I also constantly keep flipping letters into the reverse order In my own case, I attribute it to ‘Muscle memory’ developed through years of playing various musical instruments, memorizing passages (key strokes/valves) and perfecting them through repetition.
As a result of the years of practice and memorization, some fingers respond to the instructions to ‘push’ on the keys in a set sequence which is different to what a keyboard requires.