Visa exemption — purpose of entry
(3) A foreign national is exempt from the requirement to obtain a temporary resident visa if they are seeking to enter and remain in Canada solely
(f) to re-enter Canada following a visit solely to the United States or St. Pierre and Miquelon, if they
(i) held a study permit or a work permit that was issued before they left Canada on such a visit or were authorized to enter and remain in Canada as a temporary resident, and
(ii) return to Canada by the end of the period initially authorized for their stay or any extension to it;
laws-lois.justice.gc.ca/eng/regulations/sor-2002-227/section-190.html