Urgen help needed for password verification via LDAP

We have been struggling from the morning about running existing key cloak.
Keycloak version is 3.4.0 and we are seeing following error:

2022-02-22 23:53:34,436 INFO [org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator] (default task-30) pwdChangedTime size:1
2022-02-22 23:53:34,440 WARN [org.keycloak.events] (default task-30) type=LOGIN_ERROR, realmId=pm, clientId=pm, userId=40e6a574-af19-411d-afc2-ff852957770c, ipAddress=212.102.60.133, error=invalid_user_credentials, auth_method=openid-connect, auth_type=code, redirect_uri=https://pm.icare.com:443/iCareEHRWeb/rest/ui/main, code_id=9226f0e3-f7ef-4f2b-ab91-066b2fea3e7c, username=
The error is coming from the following:

public boolean validatePassword(AuthenticationFlowContext context, UserModel user, MultivaluedMap<String, String> inputData) {
    List<CredentialInput> credentials = new LinkedList<>();
    String password = inputData.getFirst(CredentialRepresentation.PASSWORD);
    credentials.add(UserCredentialModel.password(password));
    if (password != null && !password.isEmpty() && context.getSession().userCredentialManager().isValid(context.getRealm(), user, credentials)) {
        return true;
    } else {
        context.getEvent().user(user);
        context.getEvent().error(Errors.INVALID_USER_CREDENTIALS);
        Response challengeResponse = invalidCredentials(context);
        context.failureChallenge(AuthenticationFlowError.INVALID_CREDENTIALS, challengeResponse);
        context.clearUser();
        return false;
    }

It seems for some reason key cloak is not connecting with LDAP for the password verification. But it was all working from a long time.