The "irregular heartbeat" is merely a cause of death speculated by the medical examiner when the autopsy and toxicology and medical history offer nothing else definitive to explain it.
If they had found (sea) water in the lungs, they should have listed the cause of death as drowning.