In line with the Qur'anQur'an 3:159 ↗فَبِمَا رَحۡمَةٖ مِّنَ ٱللَّهِ لِنتَ لَهُمۡۖ وَلَوۡ كُنتَ فَظًّا غَلِيظَ ٱلۡقَلۡبِ لَٱنفَضُّواْ مِنۡ حَوۡلِكَۖ فَٱعۡفُ عَنۡهُمۡ وَٱسۡتَغۡفِرۡ لَهُمۡ وَشَاوِرۡهُمۡ فِي ٱلۡأَمۡرِۖ فَإِذَا عَزَمۡتَ فَتَوَكَّلۡ عَلَى ٱللَّهِۚ إِنَّ ٱللَّهَ يُحِبُّ ٱلۡمُتَوَكِّلِينَ
It is by of grace from God that you were gentle with them. Had you been harsh, hardhearted, they would have dispersed from around you. So pardon them, and ask forgiveness for them, and consult them in the conduct of affairs. And when you make a decision, put your trust in God; God loves the trusting.
The verse praises the messenger's gentleness toward people, which his habit of correcting without naming and shaming individuals shows.
In line with the Qur'anQur'an 49:11 ↗يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ لَا يَسۡخَرۡ قَوۡمٞ مِّن قَوۡمٍ عَسَىٰٓ أَن يَكُونُواْ خَيۡرٗا مِّنۡهُمۡ وَلَا نِسَآءٞ مِّن نِّسَآءٍ عَسَىٰٓ أَن يَكُنَّ خَيۡرٗا مِّنۡهُنَّۖ وَلَا تَلۡمِزُوٓاْ أَنفُسَكُمۡ وَلَا تَنَابَزُواْ بِٱلۡأَلۡقَٰبِۖ بِئۡسَ ٱلِٱسۡمُ ٱلۡفُسُوقُ بَعۡدَ ٱلۡإِيمَٰنِۚ وَمَن لَّمۡ يَتُبۡ فَأُوْلَٰٓئِكَ هُمُ ٱلظَّٰلِمُونَ
O you who believe! No people shall ridicule other people, for they may be better than they. Nor shall any women ridicule other women, for they may be better than they. Nor shall you slander one another, nor shall you insult one another with names. Evil is the return to wickedness after having attained faith. Whoever does not repent—these are the wrongdoers.
The verse forbids ridiculing and defaming one another, which the messenger avoided by not singling out the person by name.
In line with the Qur'anQur'an 68:4 ↗وَإِنَّكَ لَعَلَىٰ خُلُقٍ عَظِيمٖ
And you are of a great moral character.
The verse praises the messenger's great character, shown in this tactful way of correcting people.