Take the cost of defending the suit out of their back pay. It’s already law that they get reimbursed.
No, it's not the law. Reimbursement has to come from an act of Congress, after the shut down has ended. Up to now, that has happened - so what people think is "the law" is merely a coincidence. But it's not guaranteed. And, Trump would have to sign it.