The government should have to pay the legal fees if they lose - with 20% interest.
If looser pays became law the courts would be empty. Remember most lawmakers are lawyers. They would never create a law that essentially eliminated the need for lawyers.
The gubermint lawyers should have to pay it all out of their own pockets if they loose.