I wonder if they lose their deposit?
Good question. Depends how good their contracts team is and their negotiating skills.
At companies I worked for, our contracts always tried, at a minimum, to recoup the costs of materials we had purchased and our associated fixed costs.