Boxer briefs. 9" inseam. That's the only long term solution other than being so skinny your inner thighs don't touch.
Washing, cleanliness and drying powders if you are overweight and/or a heavy sweater. I'm both. I can shower thoroughly, crank the air conditioning, stand in front of a fan for an hour to dry out down there, and drop half a bottle of powder down there and go out into a SoCal winter and be chafed within 2 blocks. The slippery products like BodyGlide delay chafing a little longer, but that's not much at all.
The briefs work despite being fat, sweaty, dirty, day after day of hiking. You may not need a 9" inseam, but the 6" inseam rides up on me.