Bulit-in MQTT broker

I mean if I use NMAP or NetGear to scan for new devices it will show all my badges but I cannot change the name of a particular badge because as soon as I do and restart HA it will re-scan and the newest scanned devices will show up in HA, which is the devices that have already been scanned so not sure why they are being treated as new.The older one that I changed the name will not show up ounce it has been rescanned, just the “new” duplicated ones.