have your cake and eat it too

Intermediário superior (B2) informal

To want two things that can't both happen at once.

"You can't have your cake and eat it too — you either keep the money or invest it."