IAM includes a task to clean up unused role sets.
I've noticed in several projects that this feature is not well known, and the documentation is also quite limited.
However, in some cases, cleaning up unused role sets significantly improves end-user login performance.
Is there a specific reason why unused role sets are retained?
If not, my suggestion would be to automatically remove a role set once it is no longer applicable.