@Joost ********
I would tell the HR you want to cancel the work permit BEFORE you go to cancel your extension of stay because you need that receipt to cancel your extension.
AND I would tell them you want to do it about a week before your last day at work so you don't have the pressure of doing it at the last minute