Since coming out, I've always worn a swim shirt + board shorts. They're looser than the average pair of swim shorts and are more prone to bunching up instead of clinging to your body; it might help hide, or at least distract you from, what's causing your dysphoria.
There are also ways to pack while wearing swim shorts, some of which work better than others.
FtM Essentials 🔗 [Link: ftmessentials.com/pages/packing-while-swimming/] has a small FAQ on packing while swimming, and
Hudson's Guide 🔗 [Link: ftmguide.org/lockers.html/] has a section dedicated to swimming/locker room comfort in general.