iPhone buyer requesting I set passcode before shipping
I think that’s something reasonable to request. It guarantees you can either activate the device and it’s working well enough for a passcode to be set and doesn’t erode your privacy in any manner.

I’d indulge the buyer to see what they want. You could still be scammed and not get payment or have the buyer say they didn’t get the phone - so you’ll want traceable delivery / shipment or be willing to get a claim you didn’t provide the goods.

But, the passcode is neither here nor there in my eyes as making a transaction risky or safe.