I got this as well, looks like it’s BuddyPress redirecting to the referring page after login. Putting this into the theme’s functions.php sorted it out for me – just removes the BuddyPress login_redirect filter when switching users.
add_action('init', 'no_bp_redirect_on_user_switching', 9);
function no_bp_redirect_on_user_switching() {
if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'switch_to_user' ) {
remove_filter( 'login_redirect', 'bp_login_redirect' );
}
}