It is narrated from Aisha (may Allah be pleased with her), she states: If we had thought beforehand what we thought later, then no one except the wives of the Messenger of Allah (ﷺ) would have given him the ritual bath.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 563
Hadith Takhrijصحيح من غير هذا الطريق : اخرجه ابوداود، الجنائز، باب في ستر الميت عند غسله (3141) ۔ وابن ماجة ، الجنائز، باب ماجاء في غسل الرجل امرأته ..... الخ (1464) ۔ وصححه ابن حبان (2156)، (2157) ۔ وابن الجارود (517) ، والحاكم 3 / 59 ، 60 ۔ ووافقه الذهبي۔