Instead of changing some actions’ behavior based on IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS), make separate things that work with no private keys. In particular, instead of having bumpfee give out a psbt when there are no private keys, add a psbtbumpfee RPC that always gives out a psbt and just have bumpfee be disabled when there are no private keys. This is mirrored in the GUI bumpfee menu items. Additionally, instead of changing the Send button to Create Unsigned when there are no private keys, just always have a Create Unsigned button and disable Send when there are no private keys. To deal with bumpfee already doing the mutated behavior thing, that behavior is hidden behind a -deprecatedrpc=bumpfee option.
To make the GUI stuff easier to follow, test, and review, this is being based on #17509