Immigration cancelled my extension of stay before the work permit was cancelled. My employer had to give the Ministry of Labor the paperwork that was stamped and signed by Immigration and they cancelled the work permit after I left the country. They then sent me a copy of the cancellation document from MOL. We called Immigration before cancelling and they confirmed that we needed to go there first before going to MOL.
When I did this last year, I had to cancel the visa extension at the immigration office before cancelling the work permit. The Ministry of Labor refused to cancel the work permit before the visa extension was cancelled.