To question a dogmatical fact is not allowed.
Not to accept a pope is a schismatical act.
So the question is serious.
Cardinal Roncalli was certainly pope from 1958 till 1963 because of the Church’s infallibility in dogmatic facts.
Whether or not someone is pope is a dogmatic fact. The Church is infallible in its acceptance of someone as Pope. The entire Church, without exception, accepted John XXIII as Pope in 1958 until his death in 1963. So it is certain that he was Pope, otherwise the Church was mistaken. And that is against the promise of Our Lord Jesus Christ “the gates of hell shall not prevail against it”. So the church is infallible. She is infallible in dogmatic facts: John XXIII was Pope.
If you question this, you doubt the certainty of the premises of this conclusion. It is to question the promise of Our Lord, and that the Church is infallible in dogmatic facts.
No one could prove any of the causes of the loss of the papacy: death (yes in 1963), abdication, insanity, public heresy or schism.
Objection about f.m-ry :
John XXIII and Paul VI were free masons and free masons are automatically excommunicated by popes in the 19th century on, and excommunicated are outside the church, so they cannot be pope.
That they were free masons was not known until after their death. An excommunication has his full power to ex-clude a person from all “communication” (ex-communication) for a living person. To excommunicate a death person is very limited. Further and more striking : Pope Pius XII changed the rules of conclaves (the pope has the power to “bind and unbind”) and stated that everybody who enters a conclave is absolved automatically from all excommunication!
So they were popes… but bad popes.
It is certain that John XXIII was pope, although he was a dangerous pope.
The same can be said about Paul VI. He was pope because he was accepted by the entire Church. He lost his papacy because of public heresy. Indeed a pope loses his office by this causes : death, abdication, insanity, public heresy of schism. Paul VI published the first heresy in 1964 by Lumen Gentium. So from then on he lost his papacy.