Allah Almighty says: "Except for those who repent before you overpower them." [Surah al-Ma'idah: 34]
Imam al-Shafi'i (may Allah have mercy on him), reporting from some of his companions, said that they said: "Every hadd that is a right of Allah Almighty is dropped by the (offender's) repentance, and every right that belongs to people is not annulled."
Imam al-Shafi'i (may Allah have mercy on him) said: "And this is what I hold too."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / Q17319
Sa'id bin Jubayr (may Allah have mercy on him) said: Whoever commits highway robbery is the one who wages war. He also said: If he has only killed, he is to be killed; if he has taken property along with killing, he is to be killed and then crucified; if he has only taken property and not killed, his hand and foot are to be cut off. If he repents, that is between him and Allah, and the hadd will (still) be established.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17319
Hisham (may Allah have mercy on him) narrates from his father that whoever commits (an offence carrying) a hadd and then repents, the hadd will still be established upon him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17320
Ibrahim (may Allah have mercy on him) said: Whoever commits highway robbery and plunder, the hadd will be established upon him despite his repentance; the rest is a matter between him and Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17321
A man came to Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with him) after the Fajr prayer and said: I was a highway robber; before you could catch me, I have already repented to Allah myself. Abu Musa (may Allah be pleased with him) said: You have indeed come beforehand; and he dealt with him kindly.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17322