If I recall correctly, Sandra Day O’Connor stayed on the Court until the day Justice Alito was sworn in to replace her. So that nomination was done before the justice who announced retirement had actually left the court.
Remember that was an unusual situation, in that, Justice Rehnquist died after O’Connor announced plans to retire, and then Bush had two Supreme Court seats to fill. John Roberts and Sam Alito were confirmed a few months apart, as I recall. Roberts took his seat promptly because Rehnquist had died, but O’Connor stayed until Alito was confirmed.
Thanks.