[ad_1]
The reason this goes away is because when you switch to another user with User Switching you are actually getting logged in as that user, therefore you see exactly what the user will see. In your case it means the is-admin
class isn’t present on the body because the user isn’t an admin.
If you do need this in place and you understand the consequences of making changes based on the user account that they switched from, then yes you can use the current_user_switched()
function for this. Details here on this FAQ.