The Rambam says in Hilchos Teshuva, chapter 6:
There are other sins for which justice determines that retribution be exacted in the world to come with no damages coming to the transgressor in this world. There are [other] sins for which retribution is taken in this world and in the world to come. When does the above apply? When [the transgressor] does not repent. However, if he repents, his Teshuvah is a shield against retribution.
This implies that Teshuva alone will attain not only forgiveness, but will also avoid retribution/punishment. But doesn't this conflict with the concept that for some sins Teshuva alone is not enough and punishment completes the atonement, as for example in Yoma 86a:
If one commits a transgression that warrants karet or a sin punishable by death from the earthly court and then repents, repentance and Yom Kippur suspend his punishment, and suffering absolves and completes the atonement
In fact, the Rambam himself quotes this Gemara in chapter 1 of Hilchos Teshuva. How can we reconcile the Rambam's statement quoted above with the Gemara?