Any tips on what to do with one's valuables (money, passport, etc) when traveling solo and going for a swim at the beach?
That's a tough one, because it's certainly not a good idea to leave that stuff hidden in a bag in a hotel room, nor should you leave it hidden yet unattended at the beach. It's easy with two people...simply takes turns going in for a dip. Perhaps you should consider a combination of Ziploc type baggie inside a waterproof pouch that you can wear around your neck? Then just go in up to your waist. If your hotel has a safe, that may be an option, although I personally never leave this stuff in a hotel safe.
I bring a waterproof waist belt when I am traveling solo. Do a google search for "underwater case" or "waterproof Waist pack". You can usually find these in places like REI, but given the large number of waterproof cases for Iphones and cameras, you might be able to find something you can use elsewhere. The one I have can be used underwater. Check the specs to make sure it is submersible. This link shows one similar to what I have. I put my things in a ziploc bag before putting inside for extra protection. Waterproof pack