How do I set my default avatar on wordpress 5?

I want to change the default avatar in the admin panel of wordpress version 5. It would seem-go to vp kama and do everything according to the instructions

## Добавляет еще один вариант аватарки по умолчанию в настройки обсуждения
## Файл аватарки 'def-avatar.jpg' нужно залить в папку темы 'img'
add_filter( 'avatar_defaults', 'add_default_avatar_option' );
function add_default_avatar_option( $avatars ){
  $url = get_stylesheet_directory_uri() . '/img/def-avatar.jpg';
  $avatars[ $url ] = 'Аватар сайта';
  return $avatars;
}

However, not everything is so simple, in version 5 it no longer works like this

enter a description of the image here

And it is displayed in this form:

<label>
      <input type="radio" name="avatar_default" id="avatar_http://domain.test/wp-content/themes/bw/img/bw.png" value="http://domain.test/wp-content/themes/bw/img/bw.png"> 
      <img alt="" src="http://1.gravatar.com/avatar/a10d0576829f81205c7175515696d7c8?s=32&amp;d=http%3A%2F%2Fdomain.test%2Fwp-content%2Fthemes%2Fimg%2Fbw.png&amp;f=y&amp;r=g" srcset="http://1.gravatar.com/avatar/a10d0576829f81205c7175515696d7c8?s=64&amp;d=http%3A%2F%2Fdomain.test%2Fwp-content%2Fthemes%2Fimg%2Fbw.png&amp;f=y&amp;r=g 2x" class="avatar avatar-32 photo avatar-default" height="32" width="32" loading="lazy"> Аватар сайта</label>

Google sends the same function combination connected to the filter everywhere. Can you help me figure it out?

Author: Вася, 2020-11-26