Based on comments in the community I made changes to the firmware running on the Raspberry Pi to leave alone pins used by other software on the device.
All pins are no longer initialized as inputs on start, and only pins with a call to
pinMode are reset to inputs on exit for safety.
You can use 0.5.1-pi.13 pre-release firmware on the Web IDE or compile with
particle flash my_pi --target 0.5.1-pi.13 with the CLI.
If I get good feedback for this change I’ll make the new release the default for the Raspberry Pi.