throw the baby out with the bathwater
To discard, inadvertently or through overzealousness, something valuable or essential ("the baby") in the process of removing or rejecting something unwanted or undesirable ("the bathwater").
They cancelled the entire project because the new management didn't like the prototype, but I think they threw the baby out with the bathwater.