Warning: Missing argument 2 for widget_title filter

You don’t pass more than argument to that filter, so any callback expecting more than one will not get it. The core calls this filter always like this:

$title = apply_filters(
    'widget_title', 
    empty($instance['title']) ? '' : $instance['title'], 
    $instance, 
    $this->id_base
);

But you are passing just $instance['title']. Add the missing parameters, and the error will vanish.

If you cannot change the widget, change the registration for the callback for the filter, and make the other arguments optional by setting a default value:

add_filter( 'widget_title', 'my_widget_title_filter', 10, 3 );

function my_widget_title_filter( $title, $instance = [], $id_base="" ) {
    if ( '' === $id_base )
        return $title;

    // do something with the title, then
    return $title;
}