MIDI Filter for Sustain Pedal

The “Gig Script” that @dhj mentioned is the best option, as it’s acting globally and is taking effect at a very early stage in GP.

See an example here: