keycloak ldap-group-mapper for multiple groups

We have an existing application which is already integrated with keycloak 18. There is 1 custom realm and around 150 realm roles. LDAP is configured and users are imported from few ldap groups. We are adding roles manually. In order to automate role mapping, we tried using keycloak ldap-group-mapper feature. Since there were 150 roles, it created 150 LDAP groups and group mapper’s filter is not able to accommodate all. I tried using wild card pattern and it successfully imported & created all 150 groups. Application is now failing to recognize LDAP users and there is an error during authentication.

2024-01-29 01:55:10,188 ERROR [] (executor-thread-7) Uncaught server error: com.fasterxml.jackson.databind.JsonMappingException: [no message for java.lang.NullPointerException]
        at org.keycloak.models.cache.infinispan.UserCacheSession.getUserByUsername(
type or paste code here

I tried including up to 3 groups and it worked. wildcard is able to recognize correct group names and able to import but application authentication fails.