(This is mostly a reminder for me)
Reproducible also on CLI (and only with search term):
╚> php occ ldap:search 'j' --limit=2 --offset=2
Joyce, George (person_133173) (person_133173)
╚> php occ ldap:search 'j' --limit=2 --offset=12
Joyce, George (person_133173) (person_133173)
╚> php occ ldap:search '' --limit=2 --offset=0
Krista, Love (person_13317) (person_13317)
Victoria, Kennedy (person_133170) (person_133170)
╚> php occ ldap:search '' --limit=2 --offset=20
Ida, Mason (person_133172) (person_133172)
Joyce, George (person_133173) (person_133173)
Same problem on latest Nextcloud 19 (clean v.18 install + upgrade to 19) on PHP 7.4.
User directory from Windows Server 2019 AD

Same here, 19.0.0 clean install with php 7.4 and FreeIPA as backend.
Also navigating to users -> everybody gives an infinite loop of the same users.
Indeed. But also fixed with the same fix, coming with 19.0.1:

Just hit this issue on a fresh install of 19.0.0 and can confirm https://github.com/nextcloud/server/pull/21108 fixes the issue for me.
Thanks @blizzz
Most helpful comment
Just hit this issue on a fresh install of 19.0.0 and can confirm https://github.com/nextcloud/server/pull/21108 fixes the issue for me.
Thanks @blizzz