As I understand it, a laicised or excommunicated priest can validly Consecrate, even if he shouldn’t unless there is the threat of death. It would be valid but illicit.
Yet Confessions would be totally invalid, except in cases of death.
Why are some sacramental functions invalidated, while others are illicit but valid?
Baptisms are always valid. But what about matrimony and the Sacrament of the Sick?
How about traditions where Chrismations or Confirmations happen immediately after baptism? In those cases, when a priest is excommunicated or laicised, is his Confirmation made invalid even though his Baptism would be valid?