In a recent decision (No. 18-272, Yovino v. Rizo, decided February 25, 2019 Per Curiam, properly cited as 586 U. S. ___ (2019)), the United States Supreme Court (SCOTUS) dealt with the matter of a judge in a court of appeals that had participated in a case, voted on one side of an en banc review, and authored the 6-5 majority opinion. However, he died 11 days before the ruling was officially issued. The Ninth Circuit Court of Appeals allowed that decision to stand, stating:
Prior to his death, Judge Reinhardt fully participated in this case and authored this opinion. The majority opinion and all concurrences were final, and voting was completed by the en banc court prior to his death.
However, the Court vacated and remanded, taking the position that
When the Ninth Circuit issued its opinion in this case, Judge Reinhardt was neither an active judge nor a senior judge. For that reason, by statute he was without power to participate in the en banc court’s decision at the time it was rendered.
And therefore,
... [T]he Ninth Circuit erred in counting him as a member of the majority. That practice effectively allowed a deceased judge to exercise the judicial power of the United States after his death. But federal judges are appointed for life, not for eternity.
(The details and quotes are from the decision, available on the SCOTUS website.)
Here's my question: If such a scenario took place in a Beis Din, that one of the dayanim died after writing the ruling but before the p'sak was formally published, what would be the halacha? Is there a specific point in the process, some part of g'mar din, where it might matter before but not afterwards? Does it make a differenct whether the other dayanim agree, thus nullifying the question of the majority? (This is mentioned as relevant in the SCOTUS case.) Or perhaps the ruling is now seen as being issued by only two dayanim, which do not form a proper Beis Din?
Would the rules change depending on the sort of beis din? That is, would the same principle hold for a Sandhedrin Ketana of 23, ruling on capital punishment, and today's Batei Din, which are (technically) hedyotos, without proper semicha?
As this is primarily a discussion post, sources where such questions have been raised and answered would be greatly appreciated.