The pope would remain a bishop, but if a heretic, would nonetheless lose communion with the Catholic Church and cease to be pope.
But only the College of Cardinals could pronounce him formally a heretic, or a successor pope.
At best, we laymen can note that a pope seems to be in heresy, but we have no authority to actively act on that conclusion.
What about sensus fidei? At some point, that would kick into gear so to speak.
I understand that the way out of this Catch-22 only exists when there are more than one claimants to the papacy: therefore the Council could "depose" the anti-pope (the false pretender), but only with the assent of the true pope.
Or, both the anti-pope and the true pope could resign, and then the Council would be free to have a conclave to elect a new pope. Isn't this what happened at the end of the Great Western Schism (15th century)?
Catholic Encyclopedia, last two paragraphs (LINK)
I admit this isn't all quite clear, but this is my impression. Any corrections welcome.