We’re never taught that clergy (including bishops, cardinals, or Popes) are perfect; I always bear in mind that Judas was a priest.
Judas was technically a Bishop.