“’The gates of Hell have prevailed against the Church you believe in.”
Christ Jesus words are applicable to the Church. The papacy is only a part of the Church.
Unlike the head of a human body, the body of Christ survives without the visible head on earth, and the gates of hell does not prevail against it.
There have been occasions of false popes and the church has survived both during and after those times.
And again I assert that just as numerous physical monuments have been built at the command of Mother Mary and the church has validated the visions, such as with the church in Guadalupe, so can God accomplish a new set of Cardinals and a new set of Popes as He desires, outside of the norm. Or if God chooses he may leave the church without a visible head for a time, or until the end of time.
That would not mean that the gates of hell prevailed against the church.
Just Protestantism repackaged. "The Body of Christ survives without the visible head on earth"="Invisible Church"=Protestantism.