A DUID is made dynamically or changes upon reboot. Though what doesn't change from my understanding (and I have checked this on my local network), is the mac address is at the end of the DUID.
So if you have Sonar detect the MAC address part of the DUID basically (Random Numbers)(MACADDRESS) from the DHCP server and then map it to the account. This may not be a proven method, but worth looking into.
Additional, is the script you wrote for the Mikrotik IPv4 dynamic learning, doesn't seem to be an option for DHCPv6. Also DHCPv6 relay look like a pain to setup in Mikrotik.