One arrives at a contradiction, if it is not possible to obey God and the Pope at the same time. Consequently, there is some error in the assumptions. One possibility: the Pope is not the Pope.
Do you know of any other possibility?
Yes, the popes have corrupted themselves, became modernist heretics and have lost the faith, while at the same time believing they're under the Holy Ghost's protection so whatever they teach can never harm the faithful or the Church, and they are always infallibly safe to follow.
I know, I know - Enter V1's teaching that quotes Our Lord praying that St. Peter not lose the faith....this divine revelation from Our Lord has not been in any way compromised or otherwise infringed upon, because it is a revelation from Our Lord Himself. this is because Our Lord was referring to when the pope engages his papal infallibility. I cannot remember which if the Fathers taught this, but will look it up when I get the chance, or you can when you get the chance.
At any rate, as regards the Church's infallibility and indefectibility, words of wisdom.....
"If these two Doctrines be true, then whatever the popes have said or done, whatever they ever say or do, will not be a violation of the Church' s attribute of infallibility. And no matter what anyone does, whether from within or without, he will not succeed in destroying the Church. The enemies of Christ's Church do not believe this, which explains why they will never cease to try". - Fr. Wathen, Who Shall Ascend?