All praise is due to Allah, and may the peace and the blessing be upon the Messenger of Allah, his companions and those who follow him.
Performing the funeral prayer in mosques is not a condition of validity and it can be performed at any place as long as the purity of the place is assured. This is proved in the Prophet’s (PBUH) saying: "The earth has been made for me a place of prostration and a means of purification, so wherever a man of my Ummah is when the time for prayer comes, let him pray". (Ṣaḥīḥ al-Bukhārī)
Furthermore, the majority of jurists held the view that performing the Funeral prayers outside mosques had originally been in conformity with the legal ruling concerning this matter. Al-Imām al-Sandī commented saying, "Yes, it is better to perform Funeral prayer outside the mosque as it was the Prophet's usual practice to perform funeral prayers outside the mosque".
In this respect, it is important to note that both practices are permissible. Imām al-Bukhārī wrote a chapter entitled "Chapter on performing the Funeral prayer in prayer rooms and mosques".
Accordingly, in such current situation where mosques are closed in a way to combat to the outbreak of the Novel Corona Virus (COVID-19), it is permissible to perform Funeral Prayer in the prayer rooms outside the mosques, in the open areas or the graves yards.
Allah (Glory be to Him) knows best.