user_role_revoke_permissions() for administrator I am using EU Cookie Compliance module.  During module installation, permission has been set to admin also. I need to revoke that permission which is assigned to Admin as cookie pop-up is coming-up for admin also.
In Permissions, it is grayed-out. So I can't able to disable that permission.

When I used below code, it is revoking permission for all other roles but not working for Admin.

user_role_revoke_permissions('administrator', [
      'display eu cookie compliance popup',
    ]);  


Please suggest me a solution how to revoke that permission for admin.
Here is the snippet code works for @Saba original author of the post in case someone needs it.



function YourModuleName_eu_cookie_compliance_show_popup_alter(&$show_popup) {
  $current_user = \Drupal::currentUser();
  $roles = $current_user->getRoles();
  if (in_array('administrator', $roles)) {
    $show_popup = FALSE;
  }
}