We used to salute the Messenger of Allah ﷺ while he was engaged in prayer and he would respond to our salutation, but when we returned from the Negas, we saluted him and he did not respond to us. He said : Prayer demands one’s whole attention. (Using translation from Abū Dāʾūd 923)
عَبْدُ اللهِ كُنَّا نُسَلِّمُ عَلَى النَّبِيِّ ﷺ فِي الصَّلَاةِ حَتَّى رَجَعْنَا مِنْ عِنْدِ النَّجَاشِيِّ فَسَلَّمْنَا عَلَيْهِ فَلَمْ يَرُدَّ عَلَيْنَا وَقَالَ إِنَّ فِي الصَّلَاةِ شُغْلًا