If you leave a job you are officially required to cancel your extension (and therefore your passport work permit stamp is cancelled) immediately.
However, also be aware that immigration and the work permit offices are separate administrations and often not in efficient contact with each other... so it you could take the RISK of staying 4 months and leave (best to fly out), and return on a holiday visa (but if you want to work you will still have to have the work permit cancelled for a new one to be processed).