Matthew 16 has Peter confessing Christ as the “Son of the living God” and denying His mission as the suffering Messiah in almost the same breath.
Peter’s ultimate denials were during His Passion, beginning with cutting off the ear of the slave of the High Priest and continuing until the cock crowed.
And in temporal terms, those were AFTER he had witnessed the Transfiguration.