A policy cannot be deleted as long as a resource is configured to use the policy. This means that you must remove the policy from all protected resources for Access Gateway.
Roles can be used by Authorization, Form Fill, and Identity Injection policies. Before you can delete a Role policy, you must remove any reference to the role from all other policies.