After you have pressed the 1-4 keys in the Study screen and advanced to the next card, how are you checking the results of the keypress? Are you pressing the letter “I” or selecting “Card Info” from the menu? If so, you are doing the wrong thing. You are incorrectly checking the current, yet-to-be-answered card instead of checking the previous, just-answered card. You should instead be either selecting Previous Card Info or going to the Browse screen, selecting the correct card, and then viewing its Card Info. (Edit: Added: Because the problem doesn’t occur when you use the mouse to press the buttons, it doesn’t sound like this is the issue.)
Based on the information in your post, you have not yet ruled out add-ons. Please try all the Troubleshooting Steps, especially Step 2, running Anki in safe mode which disables all add-ons.
Edit: Added: Out of curiosity, what rating gets logged when you press the “1” key?