MDE devices actually report in using a device ID. MDE does not prevent using duplicate machine names. You can have two or more devices reporting under the same name but using two IDs (you will see the device listed twice).
When a device stops reporting to MDE you have to wait for the data to time out to drop from view. That is 7-30 days depending on the view duration. There currently is no option to hide or drop a device from the views. This will result in devices showing up twice for a number of days after a reimage or re-onboarding. One workaround is to tag any duplicate or decommissioned devices and drop that tag using a view filter.