Resident Status After Change of Job

Hi,

I have a query regarding resident status upon re-entry in Malaysia. I am going to complete my 182 days this year on 11th July but will be ending my current job on 13th July and moving back to my home country.
I will join another company in Malaysia in August. Will I be considered resident even after closing my tax with tax department upon my current job completion?

If I'm not wrong: As long as the total number of days you stay in malaysia >= 182 days, it's resident tax. The tax in the previous year and the following year is resident tax too. In Malaysia, we pay tax every month and get tax refund in the following year