somebody can’t have it both ways
From Longman Dictionary of Contemporary Englishsomebody can’t have it both wayssomebody can’t have it both waysused to say that someone cannot have the advantages that come from two separate situations because they cannot exist together It’s either me or her. You can’t have it both ways. → both