Hello,
I remeber few questions about Portenta, but no solution. Maybe you can try contacting people from this topic - Arduino Portenta H7 - Flashing mbed-os binary file with DFU tool not working
However, Arduino Portenta H7, as the name suggests, was ported by Arduino developers for Arduino world and not for the Mbed one. Probably similar, maybe more impossible, it will be for a RP2040, but I do not know the background, so I can be wrong.
BR, Jan