HKIDs remain valid as identifiers for life (you can still use them when, for example, identifying yourself to banks or utilities). But they only work in eGates if they are Permanent HKID cards or there is a valid visa associated with them. In general if you have an Employment Visa but then leave the job that supported it the visa still remains valid until the original expiry date., It dopes not get cancelled simply by you leaving the job.