What is the ruling on spacing between worshippers in congregational prayers because of the coronavirus epidemic?
What appears to be the case is that it is permissible to offer prayers in congregation in the mosques with gaps between worshippers in the row for fear of spreading contagion and sickness, and that is better than closing the mosques. Not forming tight rows in this case is for a valid reason, and there are similar cases in Islamic teachings with regard to the obligatory parts, conditions and essential parts of the prayer that may be waived when there is a reason to do so, even when they are more important than the issue under discussion here. But it may be noted that this applies in the case when there is no instruction from the appropriate authorities to refrain from praying in congregation in the mosque and to close the mosques temporarily until the pandemic is over, as has happened in many Muslim countries during this coronavirus [Covid-19] pandemic. In that case, it is obligatory to comply with these instructions until the pandemic is over and people are told to resume normal life, in accordance with what is in the public interest.
Source: Islamic QA