proverb

You cannot eat your cake and have it.

retain

means that

It is not possible to simultaneously eat your cake and retain it. And generally, you cannot use something and retain it intact at the same time.