Try this, its work for me
add your functions.php
add_action('init', function(){
global $wp_rewrite;
$wp_rewrite->author_base="profile";
$wp_rewrite->flush_rules();
});
and create author.php in your theme directory.
example;
<?php
$author = get_user_by('slug', get_query_var('author_name'));
echo '<pre>';
var_dump($author);