While you can take sick leave or hospitalisation leave during the notice period, this will not change your last day of employment. You are still considered an employee until the end of your notice period. Your employer is also not allowed to extend your notice period.
The notice period gives you and your employer time to plan for a handover of duties. As a responsible employee, you should work with your employer to ensure a smooth transition.