Keep br tags from stripping

Since any attribute added to <br> tag, including class names and data-attrs keeps them from stripping, quick and incomplete way could be:

function filter_function_name( $content, $post_id ) {

  $content = str_replace('<br>', '<br data-x>',   $content);
  $content = str_replace('<br >', '<br data-x>',  $content);
  $content = str_replace('<br />', '<br data-x>', $content);
  $content = str_replace('<br/>', '<br data-x>',  $content);

  return $content;
}
add_filter( 'content_edit_pre', 'filter_function_name', 10, 2 );