What @Martin.Jirsak was suggesting is to be sure that you don’t have any control definition related to a panner in Cubase that could react to the message your sustain pedal is sending (usually : channel 1 - CC 64), in these window panels, accessible with the following menu and options sequences :
- Studio>Studio Setup>Track quick controls
- Studio>Studio Setup>VST quick controls
- Still in the Studio>Studio Setup window, eventual Generic Remote definitions panes active and using the same MIDI Port as your sustain pedal.
To check this quickly, I would set all these as Not Connected in the MIDI Input drop down List (top of each pane) and see from there if there is still an issue related to the panner with your sustain pedal usage.