The best way is to give your waistband little chance to show at all. That depends on what you're wearing, but bikinis and other lower-rise styles will work better than full briefs or thongs.
Of course you can always use tucked-in shirts, other layers, and belts to keep your underpants under your pants.
For plausibility as men's underwear, relatively plain solid colors are always good -- white, black, maybe navy or a couple others -- in cotton or similar fabrics. Satin in pastel pink, maybe not.
I haven't worn these myself, but it's a good example of what I mean: https://www.soma.com/store/product/cotton+modal+tailored+bikini/570345168?color=001&catId=cat40106
For stealth panties, my favorite is Fruit of the Loom Heathers Low-Rise Briefs. Having the low-rise will prevent them from showing and the grey waistband makes it look gender neutral. Just be careful of more feminine colors like pink and nobody will know the difference.
One of my long time favorites are the Jockey No Panty Line Promise bikinis. They are made with nylon and are low rise. They come in all sorts of colors and prints and I have most of the ones they have had in recent years.
Going to the Dr I wear black or Navy blue with no problem at all