There is an exception to the mootness doctrine, known as "Capable of repetition, yet evading review." The most prominent example of this doctrine occurs in abortion cases. A pregnancy lasts about nine months, while a challenge to an abortion restriction lasts much longer. The courts have allowed such litigation to continue, even after the pregnancy has completed.
This test is hard to satisfy. It is far easier for courts to find a particular dispute is moot, especially when an appeal arises months or years later. Indeed, many courts have imposed limitations on the doctrine. For example, the D.C. Circuit and other circuits have held that a plaintiff can only invoke the doctrine if they sought a preliminary injunction, or sought a stay of an adverse ruling.
For example, in Newdow v. Roberts (2010), Michael Newdow sought to prevent Chief Justice Roberts from issuing the constitutional oath, which included the phrase "So help me God," to then-President-Elect Obama. But by the time the D.C. Circuit decided the case in May 2010, the dispute had become moot. The panel opinion, per judge Janice Rogers Brown, found the controversy became moot. (Then-Judge Kavanaugh concurred in the judgment.)