To depart, escape, or extricate oneself from some place or situation before conditions worsen or it becomes impossible, too problematic, or too dangerous to do so. With stock prices in the company threatening to plummet, we decided to get out while the getting is good.We heard that they'll be sealing the border soon, so we're getting out while the getting's good.
Leave while one can or has the chance to, as in He just had a good offer from a rival firm and decided to get out while the getting is good . This colloquial phrase uses get out in the sense of "escape" or "depart."