I relied on this mostly:
There does not seem to be any requirement that if you leave your employment before the end of the work permit termination date that you leave except that you need to leave by that date.
The notion that "you would need some time to end things properly" seems to be only valid to the extent that it seems to be the expectation that you should make those arrangements prior to the last date of the work permit.
It is quite possible that this question is answered in an authoritative way in the bumpf that the government gave you.
183 (1) Subject to section 185, the following conditions are imposed on all temporary residents:
(a) to leave Canada by the end of the period authorized for their stay;
The only exception that I saw was 184 (1) A foreign national who enters Canada as a member of a crew must leave Canada within 72 hours after they cease to be a member of a crew.
Authorized period ends
(4) The period authorized for a temporary resident’s stay ends on the earliest of
(a) the day on which the temporary resident leaves Canada without obtaining prior authorization to re-enter Canada;
(b) the day on which their permit becomes invalid, in the case of a temporary resident who has been issued either a work permit or a study permit;
(b.1) the day on which the second of their permits becomes invalid, in the case of a temporary resident who has been issued a work permit and a study permit;
(c) the day on which any temporary resident permit issued to the temporary resident is no longer valid under section 63;
(c.1) in the case of a person who is required by section 10.01 of the Act to provide their biometric information, the day on which the period of 10 years following the latest day on which the person provided their biometric information under section 10.01 of the Act ends; or
(d) the day on which the period authorized under subsection (2) ends, if paragraphs (a) to (c) do not apply.
This is the text of section 63:
Period of permit’s validity
63 A temporary resident permit is valid until any one of the following events occurs:
(a) the permit is cancelled under subsection 24(1) of the Act;
(b) the permit holder leaves Canada without obtaining prior authorization to re-enter Canada;
(c) the period of validity specified on the permit expires; or
(d) a period of three years elapses from its date of validity.
24(1) doesn't seem to apply.