Many companies have internal directories which can be downloaded and (say) committed into git on a daily basis. This could be automated in a cron job. This then gives an immediate view into what is going on.
I believe that the Slack API (if your company uses Slack) can be persuaded to give you the list of deactivated accounts. Then you just check this into git (on a daily basis), and you are done.
And, of course, in this AI Agentic world, you can probably ask your HR bot about the recent layoffs and get the information even more easily!
Yep you can use your browser cookies to be authenticated and hit the slack api and get deactivated accounts. It’s wild and depressing to watch folks get deactivated in real time