My father said, "Messenger of Allah ﷺ said, "Whenever I stand for prayer, I want to prolong it but on hearing the cries of a child, I would shorten it as I dislike to put its mother in trouble." (Using translation from Bukhārī 868)
عَنِ النَّبِيِّ ﷺ قَالَ إِنِّي لَأَقُومُ فِي الصَّلَاةِ أُرِيدُ أَنْ أُطَوِّلَ فِيهَا فَأَسْمَعُ بُكَاءَ الصَّبِيِّ فَأَتَجَوَّزُ فِي صَلَاتِي كَرَاهِيَةَ أَنْ أَشُقَّ عَلَى أُمِّهِ