Switch to user link

Here is tested code:

add_action( 'woocommerce_admin_order_data_after_billing_address', 'display_admin_switch_user', 10, 1 );

function display_admin_switch_user($order){
    $data  = $order->get_data(); // The Order data
    $user = $order->get_user();
    $user_id = $order->get_user_id();
    
    if ( method_exists( 'user_switching', 'maybe_switch_url' ) ) {
        $url = user_switching::maybe_switch_url( $user );
        if ( $url ) {
            printf(
                '<a href="https://mysite.sk/plugins/user-switching/%1$s">Switch to %2$s</a>',
                esc_url( $url ),
                esc_html( $user->display_name )
            );
        }
    }   
}