ENOfficial
It was narrated from Moosa bin Talhah that his father said: We used to pray with animals passing in front of us. We mentioned that to the Prophet (ﷺ) and he said: “If you put something the height of the back of a saddle in front of you, then it will not matter what passes beyond it.”
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا عُمَرُ بْنُ عُبَيْدٍ، عَنْ سِمَاكِ بْنِ حَرْبٍ، عَنْ مُوسَى بْنِ طَلْحَةَ، عَنْ أَبِيهِ، قَالَ كُنَّا نُصَلِّي وَالدَّوَابُّ تَمُرُّ بَيْنَ أَيْدِينَا فَذَكَرْنَا ذَلِكَ لِلنَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ مِثْلُ مُؤْخِرَةِ الرَّحْلِ تَكُونُ بَيْنَ يَدَيْ أَحَدِكُمْ ثُمَّ لَا يَضُرُّهُ مَا مَرَّ عَلَيْهِ وَقَالَ عُمَرُ مَرَّةً بَيْنَ يَدَيْهِ.
sunnah.com