167 days in Malaysia

I have reached to Malaysia on 27 Feb 2021 and returned to India on 13 August 2021. It's total 167 days. Iam on EP visa. I have returned back to Malaysia on 21st Feb 2022 and still in Malaysia. My question is

- Do I need to pay tax for year 2021.
- I have provided the letter from my office to tax department, they have approved and refunded the amount. After a month all of sudden I have received the notice to pay tax from my salary for year 2021. What else I can provide them to get a waiver.
- if i will be spending more than 182 days in 2022 can I apply for tax return for year 2021 & 2022 while filling income tax in year 2023.
- can you help in case of any exemption.
Thanks in advance
The short answer: yes, you need to pay tax.

And since you're not considered a tax resident, you need to pay the highest prevailing rate, which I believe was 30% for 2021.

For year 2022, you can claim a refund on the difference between the highest rate and the rate you should pay as a tax residence. But this is depending on you becoming a tax resident. You don't have to wait for your 2023 assessment to do this, but can do it as soon as you become a tax resident (6 months consecutive).
Thank you so much for your help.

I will pay complete tax for 2021 right now.
I came back to Malaysia in Feb 2022 and am still there ( 183 days will be completed by this August end)
I would like to ask after completion of 183 days (in year 2022) can I still apply for a refund for year 2021 in year 2023. Or I can only apply for year 2022.
If yes, when can I apply for the refund process.

Thanks in advance
The key point is to become a tax resident. You can check the tax authorities website on the requirements (lembaga hasil).

If your 2021 stay in Malaysia is considered continuous residence into 2022, you may be able to get a refund for 2021. But if it's considered a new “stay”, then I would expect them to reject it.

If you are with the same employer and have paid taxes throughout, you should have a good chance.
From what you said you were a non resident in 2021 and have to pay the expensive non resident tax rate. I don't think you will get a refund for 2021. The clock started again in 2022.

@micern thanks

@Nemodot thanks