The Prophet ﷺ said, "I sometimes stand in prayer intending to prolong it, but then I hear a child crying, so I shorten my prayer, not wanting to cause hardship to his mother."
أخبرنا سويد بن نصر قال حدثنا عبد الله عن الأوزاعي قال حدثني يحيى بن أبي كثير
عن النبي ﷺ قال إني لأقوم في الصلاة فأسمع بكاء الصبي فأوجز في صلاتي كراهية أن أشق على أمه
Bukhari transmitted it in the Book of Adhan, the chapter on the one who shortens the prayer when a child cries, hadith no. 707, from the hadith of Uzai through this same chain, and it is also found in Sunan al-Kubra, hadith no. 899.