Employee is still visible in payroll even after marking inactive
Please make sure to mention the termination and resignation dates from the employee's work profile and then mark him/her inactive
Read Here ...