The correct spelling of "DOMAIN\username" in LDAP search syntax is "DOMAIN\5cusername".
We're lucky one of our example users had valid hex in their username's first two characters and that the byte with this hex value had the high bit set so that it caused a UTF-8 decoding error, because Python package ldap3 "helpfully" treats \ as \ if the following two characters are invalid hex.