Add_menu_page() error message -> “You do not have sufficient permissions to access this page”

Run this once, it will be saved in database. You can run it once by adding it to functions.php and reloading the site once.

$user = new WP_User( $user_id ); // the user id you want to have that capability
$user->add_cap( 'edit_others_posts' ); // or any other capability that you want