If you are using the new impersonation feature (enabled by setting the hidden site setting experimental_impersonation to true), the last_seen_at timestamp will no longer be touched when impersonating a user.
https://github.com/discourse/discourse/pull/34872
We are still in the midst of planning the rollout of the new impersonation feature to Discourse hosted forums.