I had a similar problem.
I made a function to lower the prority of the “Ultimate Member”-Avatar-Function.
add_action( 'init', 'lower_um_avatar_priority' );
function lower_um_avatar_priority() {
remove_filter('get_avatar', 'um_get_avatar', 99999, 5);
add_filter('get_avatar', 'um_get_avatar', 4, 5);
}