I have found, at least on PC, that once they start circling you, as long as they aren't ground level, you can crouch and they'll just fly in circles around you without hurting you. This saved me many times as a beach bob

More Meganeura Encountering Tips