Retention bonus and separation

My employer paid a retention bonus last year with the condition being that I should be employed with the organization for a period of 12 months from the date of payout. It states that in case of a separation before the completion of 12 months the entire bonus ia payable back. I'm in the 11th month (so a little over 3 weeks remaining for the 12 month period) and have received an offer that I want to take up. I have considered delaying putting in my resignation, but that's not an option because of the joining date at the new company isn't flexible. Considering my notice here is for 2 months, it would cover the remaining period of the bonus lock in period. My understanding is even during the notice period individuals are considered to be employed and once cease to be employed after the last working day. Based on this, I understand that even if I put down my resignation right away I would fulfill the terms of the retention bonus and hence my employer cannot ask me to pay it back. Would be great if you could share your thoughts on this and point out anything in particular I should be careful about while navigating this. -