Findings found here:
https://picopalgbc.wordpress.com/2025/08/06/97-swap-pclk-and-den-port-code-to-pico-pal/
Line 347 in src/rp2_common/hardware_pio/pio.c currently uses 32u as the check for the gpio pin number threshold but this doesn't support the RP2350B with 48 GPIO so this would return the error code -5 or invalid arg from this line.
invalid_params_if_and_return(PIO, pin >= 32u, PICO_ERROR_INVALID_ARG);
Thus the fixed line is here:
invalid_params_if_and_return(PIO, pin >= NUM_BANK0_GPIOS, PICO_ERROR_INVALID_ARG);