Since your question is tagged with backpacking and wild-camping, I am assuming you are out in the wilderness.
In that case, just hide your valuables prior to arrival at the beach. Just head 15+ feet off of the trail, and you should be trivially able to find a spot to hide a handful of stuff.
From geocaching, even if someone was to know the general vicinity of where something was, it can be quite a challenge to locate a fist-sized cache of stuff amongst everything else around.
When I've traveled, I've never had a problem finding a random bunch of rocks that I can move to expose a little hole in which to tuck my stuff, then cover them back up, and I've even done that in busy, popular places without any problems.