SOLVE
In the class class-wc-admin-php of Woocommerce there is a method called prevent_admin_access that validates the user permission, also there is a filter you can use to make your own logic.
woocommerce_prevent_admin_access
So in your theme functions.php or your custom plugin add next code.
add_filter('woocommerce_prevent_admin_access', 'check_admin_access');
function check_admin_access( $redirect_to ) {
$user = wp_get_current_user();
if( is_array( $user->roles ) && in_array( 'mycustomrol', $user->roles ) ) {
return false;
}
return true;
}
I worked for me.