at the cost of
idiomDefinition of at the cost of
: by giving up or hurting (something else)
She completed the project on time but at the cost of her health.