It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the Messenger of Allah (ﷺ) said (on the occasion of Hajj): "O Allah! Have mercy on those who shave their heads." Those who had their hair cut short requested, "Pray for mercy for those who have their hair cut short as well, O Messenger of Allah!" The Prophet (ﷺ) again prayed for those who shaved their heads. When they repeated their request, the Messenger of Allah (ﷺ) (the third time) said: "And (have mercy) on those who have their hair cut short as well."
Hadith Referenceالسنن المأثورة / باب ما جاء في فدية الأذى / 482
Hadith Takhrijصحیح بخاری، الحج، باب الحلق والتقصیر عند الاحلال، رقم: 1727، صحیح مسلم، الحج، باب تفضیل الحلق علی التقصیر، رقم: 1301۔