Can we setup a policy where staff record gets deleted after X days of absence?

Yes, We do have a policy (P23) where we can set up auto deactivation of staff after x days of continuous absence.

You can enable the policy from Settings > Policy > Add Policy.