No. I’m saying that Popes are not infallible in everything they say. Francis is quite fallible in some of his teaching. Where do you get ‘A pope cannot teach heresy”?
I agree they shouldn’t, but I’m unaware if any auto=excommunid=cation when they do. Might even not be a bad idea.
You should read up on St Robert Bellarmine, Doctor of the Church, regarding the Popes and heresy:
https://www.fisheaters.com/bellarmine.html