All depends on the 2FA method that was selected. In some cases the lockout is easier to fix and the person can regain access to the account faster. In other situations this may require the use of another device that was initially registered as an alternative authentication method.
For example if a person uses a U2F security key he or she should have the other key previously registered that could be used in such an occasion. In the situation of losing a mobile device with an authentication application there should be another device that generates TOTP registration.
Two-factor authentication is the best way to protect against phishing and increase overall organization’s security however it also needs to be well established within the company to minimize lockout consequences.
That’s why it’s critically important for security administrators to have always alternative authenticators in place to prevent organization’s employees from getting locked out completely and lose application access forever.