@Robert Willadsen, Thanks for posting in Q&A. From your description, I know you have cleared registry key on the device. Could you confirm if you remove the registry keys under the following location?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments
Also the device in both Azure AD and Intune are both removed, And related certificates are removed Please also ensure the device is not registered to Autopilot,
https://learn.microsoft.com/en-us/autopilot/add-devices#delete-autopilot-devices
If all of the above information is removed, based on my experience, the device is removed from Intune. If it still shows managed and the reset isn't working, I suggest reinstalling the device OS to make it works.
Hope the above information can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.