The dogma of the indefectibility of the Church was taught by the 4th Council of Constantinople, the Second Council of Lyons, the Council of Florence, and the First Council of the Vatican. This dogma is based on the words of Jesus that because Peter is the Rock on which the Church is founded, the Church cannot fail. Therefore, Peter cannot fail in his teaching or his faith. For the Rock cannot turn to sand, nor can the Church be built upon a Rock that is false.
The true valid Roman Pontiff is that Pope whom the body of Bishops accepts as their head. If the body of Bishops were ever to accept a false or invalid head, the Church would have lost Her indefectibility. The true valid Pope is therefore the one accepted by the body of Bishops. And since the words of Jesus on Peter as Rock cannot fail in their effect, Peter cannot fail in truth or faith. If Peter could teach grave error, or could fail in faith by apostasy, heresy, or idolatry, then the words of Jesus would have failed in their effect. Yet is it dogma that they cannot so fail. Therefore, neither can any of Peter’s successors so fail.
The result is that, if anyone should accuse any Roman Pontiff of a grave error on doctrine or discipline, or of a grave failure of faith, such as apostasy, heresy, or idolatry, he commits the sins of formal schism and of formal heresy. For he denies the above dogmas of the above Councils, and thereby denies the teaching of Christ himself. And he separates himself from communion with the Apostolic See. And this is true for any rejection of any Pope, past or present. Since Vatican I especially, they commit heresy and schism who reject any Pope as heretics or apostates or idolaters, including Vigilius, Marcellinus, Honorius, John XXII, Saint John XXIII, Saint Paul VI, Saint John Paul II, and Francis. For the Rock on which the Church is founded is not only Peter, the past and first Roman Pontiff, not only the current Roman Pontiff, but Peter himself and each of his valid successors.
Therefore, when Pope Francis resigns or dies, and a new Pope is elected, those who continue to reject the Papacy and teaching of Pope Francis are condemned forever as perpetual heretics and schismatics, until and unless they repent.