Unable to stop impersonating a user if 2FA has not been configured

My GitLab instance requires 2FA for all users and has a grace period of 2 days.

If I impersonate a user that has not configured 2FA and the grace period has expired, I am unable to use the stop impersonating button as all actions are prevented unless 2FA has been configured.

(unable to search for duplicate issues as the site seems to be broken and returning error 500)

Edited by Matt Baker