If a building is destroyed half-way through building it

Does the builder lose the total cost of the building?

Yes, you can refund some by deleting the foundation before destroyed