What is the ruling on coming early to Jumu‘ah prayer, then going out for some reason before the prayer?
Question

In Ramadan, if a Muslim comes early on Friday, at the first hour, then goes out of the mosque for some reason, then comes back again, will he attain the virtue that is mentioned about coming early at this time?
Praise be to Allah.The virtue of coming early to Jumu‘ah prayer is proven, and it is proven that the worshippers will vary in terms of reward according to how early they come, as is mentioned in the hadith of Abu Hurayrah (may Allah be pleased with him), who narrated that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever does ghusl from janaabah on Friday, then comes to the mosque early, it is as if he sacrificed a camel. Whoever comes at the second hour, it is as if he sacrificed a cow. Whoever comes at the third hour, it is as if he sacrificed a horned ram. Whoever comes at the fourth hour, it is as if he sacrificed a chicken. Whoever comes at the fifth hour, it is as if he sacrificed an egg. Then when the imam comes out, the angels come in to listen to the reminder (khutbah).” Narrated by al-Bukhaari (881) and Muslim (850).
What may be understood from this is that the virtue is attained by the one who comes early and sits, waiting for the prayer.
As for the one who comes early, then goes out for some reason, then comes back, what appears to be the case is that there is a difference between the one who has an excuse and the one who does not. The one who goes out for an urgent need, such as relieving himself or doing wudoo’, or something that came up and he could not delay it, is excused, and there is the hope that he will attain the reward in full.
However, as for the one who goes out for some reason that is not urgent, and he is able to delay it until after the prayer, then he is no longer waiting for the prayer, and he will not attain any reward except what is commensurate with what he has done.
 Similarly, if the one who is observing i‘tikaaf in the mosque goes out of the mosque, his i‘tikaaf is rendered invalid, because i‘tikaaf means staying in the mosque to worship Allah, may He be exalted.
But an exception is made to that if he goes out for something that cannot be avoided, such as relieving himself, doing wudoo’ or ghusl, or bringing food if he does not have someone who can bring food to the mosque for him, and other matters that cannot be avoided and cannot be done in the mosque.
See the answer to question no. 37951 .
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The hadith of ‘Alqamah and ‘Abdullah ibn Mas‘ood (may Allah be pleased with him) indicates that the Sahaabah were very keen to come early to Jumu‘ah, and that they would feel very sad if they found that someone else had come there before them, because Ibn Mas‘ood said: “The fourth of four?!” It was as if he was criticizing himself, as he had wanted to be the first to arrive.
What is meant is that the person himself should come early, and not put his handkerchief or his book or a Qur’an stand [to mark his spot], as some people do nowadays; you find some of them putting a handkerchief or a miswaak or their keys [to mark their spots]. … but what is meant by coming early to Jumu‘ah is that the person himself should come [and wait for the prayer].
Hence the scholars (may Allah have mercy on them) differed as to whether it is permissible for a person to put something in his spot to reserve it for himself. Some of them said that it is permissible, and some said that it is not allowed. Those who say that it is permissible noted that the Prophet (blessings and peace of Allah be upon him) gave permission to set up tents in the mosque, and this is a kind of marking one’s spot, because no one will pray in the place where the tent is, and no one will sit there except the owner of the tent. And some of the scholars did not allow that, and said that it is not permissible, and that this is reserving a spot when someone else has more right to it.
What is most likely to be the case is that it depends:  if someone puts this thing there to mark that spot, because he went out of the mosque for a valid reason, and will come back after he has finished with that matter, then in this case there is nothing wrong with it, because he needed to go out.
But if he put something in this spot and went back to his house or his family or his shop, then this is a transgression against the one who comes early, because the latter has more right to this spot." (At-Ta‘leeq ‘ala al-Kaafi 2/221).
And Allah knows best.