Yes, before the match vests.
Your own contributions belong to you, but the employer's match often vests over several years. Under cliff vesting you go from owning none of it to owning all of it on a single date, so leaving the week before can cost you the whole match.