I think the order was reasonable but let's remember that something lies between being forced
to do something and being forced
not to do something. What lies between is freedom, and it's a much larger space than the two extremes combined.
The Rabbi might use his freedom to leave his synagogue open, close it until we defeat coronavirus, or close it until defeat all transmissible contagious disease.