As a workaround I usually:
- open a Chrome Incognito window
- login as myself
- impersonate
- just close Incognito window to logout.
This specifically avoids executing the “logout” which would log users out of all sessions on all devices.
EDIT:
Alternatively if the Discourse instance uses SSO against another authentication provider then you can just visit '/session/sso` and that will log you back in as yourself.