Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- It is prohibited to pass in front of someone who is performing Prayer or between him and his sutrah (barrier placed in front of a person praying).
2- As for Al-Masjid Al-Haram, it is not prohibited there to pass in front of those who are offering Prayer and Prayer is not disrupted by any of the three mentioned things or others as it is a place that is thought to be very crowded.
Answering your question, the late Saudi scholar, Sheikh Ibn Baz (may Allah have mercy on him) stated:
It is prohibited to pass in front of someone who is performing Prayer or between him and his sutrah (barrier placed in front of a person praying).
The Prophet (peace be upon him) said: “If the one passing in front of a praying person were to know what (sin) is (incurred) upon him, it would have been better for him to stand for forty than to pass in front of him.” (Al-Bukhari and Muslim).
That disrupts one’s Prayer and makes it void in case the passer was an adult woman, a donkey, or a black dog.
Imam Muslim reported a similar Hadith on the authority of Abu Hurairah (may Allah be pleased with him), but in this Hadith he did not specify only the black dog. Scholars opine that the indefinite text is qualified by the definite text.
However, if the one who passes in front of someone performing Prayer was other than these three mentioned, then it does not disrupt the Prayer but it reduces its reward.
The Prophet (peace be upon him) said: “The passing of a woman, a donkey, or a black dog disrupts the Prayer if there is nothing before a worshipper like the back of a saddle.” (Muslim)
As for Al-Masjid Al-Haram, it is not prohibited there to pass in front of those who are offering Prayer and Prayer is not disrupted by any of the three mentioned things or others as it is a place that is thought to be very crowded.
The same case applies to Al-Masjid Al-Nabawi (the Prophet’s Mosque in Madinah) and other similar Masjids (mosques) if they are very crowded and it is hard to avoid passing in front of those offering Prayer.
Allah (Glorified and Exalted be He) says: “So keep your duty to Allah and fear Him as much as you can.” (At-Taghabun 64:16)
Also we read in the Quran: “Allah burdens not a person beyond his scope.“ (Al-Baqarah 2:286)
The Prophet (peace be upon him) said: “What I have forbidden to you, avoid it; what I have ordered you [to do], do as much of it as you can.” (Al-Bukhari and Muslim)
Almighty Allah knows best.