Actually, Arthur C. Clarke more or less anticipated this problem and its solution….. back in the '50s.
Wow.
I should have explained.
The book's/books' protagonist was given custody of a robot that had been "locked" by its master many centuries before.
It followed him around, but wouldn't communicate, act, or interact, so he took it to the computer that ran the city (The "City Fathers") which couldn't unlock it but was able to create a duplicate without the lock.
Close enough?