I have the same problem with a MacBook Pro 2016. I tried everything, reinstalled the OS from scratch 3 times, the terminal delete command, and reset SMC and NVRAM. Once it worked for about a day and then it stopped working again. The problem started when I tried adding a fingerprint. Took it to the MacBook service center and they said they couldn't find the issue and that maybe it was the sensor and that the motherboard needed to be changed. That's way too expensive, so I am sticking with the MacBook like it is, everything else works fine, it's just that issue with not being able to use the touch id. And the message saying "Failed" or "fingerprint limit reached". I am sure it's a bug, because as I said it was working fine until I tried adding a fingerprint. And another time after resetting sMC and cram it worked for a day. Any suggestions will be greatly appreciated.
You are so right about making sure to put back the two metal rings when you screw back the two (red) 10.3mm screws. I missed putting back one of the rings and read your comment after I had installed the drive and closed the macbook. Everything was working fine, but I went back to open it an leave it just as it was, with both metal (one with a plastic/cloth material around it) plates/rings attached properly. So it is very important to make sure you put those two 10.3 mm screws back with the plates/rings that they hold, exactly as they were before you put it apart.