Hi. There's no minimum requirement of returning back to Canada. You should be good if you come back before the expiry date of your work permit. However, I was asked by the immigration officer about my returning date when I visited back home 8 months prior to my study permit expiration. Thank you.