Messenger of Allah (may peace'be upon him) observed once or twice:" May Allah have mercy upon those who get their heads shaved." And he also said:" Upon those too who got their hair clipped." (Using translation from Muslim 1301a)
حَلَقَ رَسُولُ اللهِ ﷺ وَحَلَقَ طَائِفَةٌ مِنْ أَصْحَابِهِ وَقَصَّرَ بَعْضُهُمْ وَقَالَ ابْنُ عُمَرَ إِنَّ رَسُولَ اللهِ ﷺ قَالَ «يَرْحَمُ اللهُ الْمُحَلِّقِينَ» مَرَّةً أَوْ مَرَّتَيْنِ ثُمَّ قَالَ «وَالْمُقَصِّرِينَ»