Already fixed in ESP32-Pico-V3 fails to upload/debug using esp-prog - #20 by ivankravets and will be included in the next platform-espressif32
release.
This sounds exactly the same like PlatformIO not recognising CONFIG_PARTITION_TABLE_OFFSET for debugger and upload · Issue #403 · platformio/platform-espressif32 · GitHub which was already fixed in the development version of the platform.
If it still doesn’t work or need some clarifications, open an issue there.
The code you’re talking about is in GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO so you can submit a pull request and have the developers review your code.