Yes, the work permit will be canceled in case of leaving work. Your cancellation process is made by your employer. This cancellation should be made in 15 days following the end of the contract. If you want to work within a new company, your new employer may apply for a new work permit.