Add a class with body_class to a specific url with parameter

You’re overcomplicating it a bit. ?um_action=edit is a query string, and its values are available in the $_GET superglobal. To check if it exists, and has a specific value, you just need to do this:

function leweb_add_body_class_um_edit_profile( $classes ) {
    if ( isset( $_GET['um_action'] ) && 'edit' === $_GET['um_action'] ) {
        $classes[] = 'leweb-um-profile-edit';
    }

    return $classes;
}
add_filter( 'body_class','leweb_add_body_class_um_edit_profile' );

tech