As far as my knowledge goes there is not point submitting your application to Buffalo if you decide to leave right after submitting it.
This goes for everyone, you can leave Canada after getting AOR, your file wont be transferred to home county. Medicals can be done anywhere. Anytime before...