If you are being carried out by a rip tide you should swim parallel to the beach. This is how you EXIT a rip tide. If you do it soon enough, you will not be far from the shore. Where people get in trouble is when they try to swim against the rip tide. Don’t fight it; just swim out of it.
We used to locate rip tides and ride them out past the surf line. We did this for body surfing and SCUBA diving.
yup...very exhilarating to catch the edge of one for a zoom through a coral cut while SCUBA diving from shore. Go with the flow.