When changing color (in this case of a TabItem border) and then want to revert the color to the default one you need to get the default color. Here is an implementation of IValueConverter that sets the border brush to red and if value is true otherwise uses the default value for BorderBrush.

class BoolToRedBrushConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if(value is bool warning && warning == true)
        {
            return new SolidColorBrush(Colors.Red);
        }

        var defaultTabItemStyle = (Style)Application.Current.TryFindResource(typeof(TabItem));
        return defaultTabItemStyle?.Setters.OfType<Setter>()
            .SingleOrDefault(s => s.Property == Control.BorderBrushProperty)?.Value;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) =>
        DependencyProperty.UnsetValue;
}