Hey, sending this sysex seems to work just fine on RPi4.
Patchbox OS comes with ‘amidiauto’ which automatically hooks up the ALSA MIDI connections between hardware and software MIDI ports. Maybe on your system it would make sense to change the configuration, so PD’s output is only connected to Akai Fire controller (and any other necessary devices). You can do this by customizing the amidiauto.conf.
See my comment in Midi connection manager and the linked ORAC topic inside it for details on how the config file works.