My point was never that there aren't security protocols that could be used, only that its not relevant whether the employee trusts the company in that scenario.
With the proper protocols in place, a company doing layoffs signals "we trust you can still perform your role as a developer, you can still communicate/collaborate with your colleagues and you can even access the source code (because who really is going to check if you are deleting the code repo from your machine?), and the removal of write-access to the systems can be seen as a smoke test if the transition can be done orderly", while the standard current procedure just says "Through no fault of your own, you will be seen now as a potential threat so we will treat you as toxic material".