Forza horizon 4 annoying keyboard problem

I am currently playing with medium/high settings, fps uncapped, the game runs very well, no problems except that whenever I press a key, throttle/steering etc. It works about 2-3 seconds later or won’t work at all. It is unplayable. And when I cap my fps at 48 or 36 steering, throttle, braking, everything works fine but the performance becomes crap. So is anyone having this same issue or does someone know how am I supposed to fix this, please help!