Welcome. Where are you at? 3" should be fine depending on the beach. I've ridden a 4" folding ebike, a 2.25" non-ebike single speed and even a 1.95" geared non-ebike on our Oregon beaches without much issue IF you're on the denser packed sand close to the water and especially at lower tide as Jeremy says. In really loose sand nothing works well.
I really like riding our beaches here in Oregon as we have miles of compacted, uninterrupted beach. In fact I just picked up an
Lectric XP Lite belt drive single speed ebike to be used exclusively for the beaches and am planning on being over at one of the beaches tomorrow . This bike is about as light weight, simple and minimalistic folding bike as one can find, which is best for this environment. Just need to clean and hose off after riding. Bike comes with 2.6" tires but I have some 3" knobbies I'll see if I can fit them on.