For MSAD, there is a specific configuration option to make the LDAP store consider the objectGUID:
builder .named("default") .stores() .ldap() .activeDirectory(true)
For MSAD, there is a specific configuration option to make the LDAP store consider the objectGUID: