All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no objection to remain standing until the Athaan (call to the prayer) ends so that a Muslim can combine the reward of repeating the Athaan with that of greeting the Mosque, since each constitutes a Sunnah.
Abu Sa'eed Al-Khudri narrated that the Prophet said: “When you hear the call (to prayer), repeat what the Mu'ath-thin pronounces.” [Al-Bukhari]
Another Hadeeth from Abu Qataadah As-Sullami reads: “Whoever of you enters the Mosque, is advised to perform two Rak'ahs before sitting down.”
On the other hand, if it is meant by your question that some people enter the mosque at the times when performing the prayer is disliked, such as before Maghrib or when the sun is at the meridian, and they do not perform prayers till the Athaan is finished and then they perform the prayer, then there is a disagreement among scholars concerning this point. The majority of scholars believe that it is not permissible to perform a prayer at the time when performing the prayer is disliked, whether there is a reason for that prayer or it is an unrestricted optional prayer.
The Shaafi'i School of jurisprudence is of the view that it is permitted to perform the prayer during the times that other schools do not permit, as long as there is a reason. This is the predominant opinion, Allah willing.
For more benefit on performing the prayer during the disliked times and the prayer of salutation to the Masjid, please refer to Fataawa 84280, 85238, 107202, and 84446.
Allah knows best.