According to the answers to this question you can't be (successfully) sued for statements you make about someone who is already dead. But what if you said something defamatory about John Doe while he was still alive, he then died, and his estate then files a lawsuit against you before the statute of limitations has passed? Could such a lawsuit succeed?
In the United States, this is a matter of state law and is not uniform.
The common law rule under English law (which the English themselves later codified) (see also here) and the majority rule in U.S. states is that defamation actions do not survive the death of the party that is defamed (although a judgment secured at the conclusion of a defamation action does survive the death of the judgment creditor). See, e.g., this North Carolina statute, and this Indiana statute. But defamation actions arising during life survive the death of the defamed party in Montana. And, this Pennsylvania statute, at least on its face, appears to provide that a defamation action would survive the death of the plaintiff.