perhaps if you read what Dr. Feser, a highly respected Catholic philosopher, writes about Papal Fallibility
Edward Feser: Papal fallibility (Updated)
Dr.Feser said the reverse is actually true, namely that the Church “puts the pope in a doctrinal box.”
“Even when he is speaking ex cathedra [authoritatively from the chair], he must stay within the parameters he has inherited,” he said.
“He can draw out implications implicit in earlier doctrine, but he cannot make up new doctrines out of whole cloth. And what he teaches must be consistent with the entire body of past binding teaching. He is not permitted to contradict past doctrine and he cannot pit one doctrine against another,” he added.
The professor quoted from recent Vatican Councils to demonstrate how the pope is tasked by God to, in the words of the First Vatican Council, “not…make known some new doctrine, but…religiously guard and faithfully expound the revelation or deposit of faith transmitted by the apostles.”
He also quoted the Second Vatican Council’s teaching that the Church cannot teach contrary to Scripture.
“The living teaching office of the Church… is not above the word of God, but serves it, teaching only what has been handed on, listening to it devoutly, guarding it scrupulously and explaining it faithfully,” Feser quoted of Dei Verbum [Word of God].