Sustain pedal doesn’t make a difference in this case, really.
When you record a single repeated note, matched exactly to the metronome, do you get clean quarter notes? You can check this further by selecting one of the notes and checking the properties panel for start and end offsets. There are (I think) 480 units in a quarter note. If you’re playing as precisely as possible, this will help you check your offsets.
What is your quantization set to?