Birthright role assignment rule not working

We have added a birthright role to the existing birthright roles list. Other birthright roles are working fine and are getting assigned as pr assignment rule but the other role that was recently added is not getting assigned even after triggering refresh task. This role is dependent on an attribute of application and should always be assigned only if that application exist in identity.
Has anyone faced and fixed this kind of issue?

Have you tried testing the assignment rule logic independently of an assignment rule context?
(debug > run rule, which will require you to duplicate the code && rework it slightly in order to troubleshoot/introduce breakpoints).

Is the role “special” by any chance? (for example, disabled)