All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
If the situation is as you have described in your question, then it is permissible for you to benefit from the amounts given back to you by court order. Since the judge has considered your suspension an unfair dismissal, you are entitled to whatever the court rules in similar situations.
On the other hand, since the court`s decision doesn`t contradict with any text of Sharia nor its general rules; rather it achieves common good and wards of harm, then it must be put into practice. And Allah the Almighty knows best.