Discovery overwrites configuration of existing things

This sounds like something unique to the Nuki binding. If there is no other advice here, I recommend opening a new issue on the openhab-addons repo. See How to file an Issue.

I’ve moved your post to a more appropriate category.