by Olumuyiwa Taiwo.
If I'm not mistaken, this is the same as discussed at https://moodle.org/mod/forum/discuss.php?d=339718.
I explained the cause in my first comment - https://moodle.org/mod/forum/discuss.php?d=339718#p1369123 - and proposed a solution in subsequent comments. My proposed solution (barring a patch/fix for the core LDAP plugin) is to develop a new LDAP plugin that extends the core plugin and overrides either $auth->sync_users() or $auth->update_user_record()