Meaning of “have your cake and eat it” - Learner’s Dictionary

have your cake and eat it

to have or do two things that it is usually impossible to have or do at the same time

(Definition of “have your cake and eat it” from the Cambridge Learner’s Dictionary © Cambridge University Press)