Do you know which PC number the DPC5 sends when you bypass? I use a DPC8 which sends PC0.
I you haven’t already, you will need to tell the H9 to go into bypass when it receives the appropriate PC number.
In H9 Control go to Pedal > MIDI Settings > Program Change Receive Map and set Program Change Number 0 (for example) to bypass the pedal. It sounds like your H9 might currently be set to load a particular preset number (I think the default is to load Preset 1).
Hope that helps.