Your employer cannot withhold your final salary if you have served your notice period.
The notice period gives both parties time to plan for a smooth transition, including handover arrangements. As a responsible employee, you should also fulfil your duties before leaving employment.
If you are a foreign employee leaving employment, your employer must withhold all monies (including salary and leave pay) for up to 30 days for tax clearance upon notifying the Comptroller of Income Tax of the employment cessation.