Hello @Thomas R ,
Thank you for posting here.
One difference between Policies vs Preferences is as below:
A policy is removed when the GPO goes out of scope—that is, when the user or computer is no longer targeted by the GPO. A preference, however, remains configured for the targeted user or computer even when the GPO goes out of scope. Another way of saying this is that preferences tattoo the registry on the client computer, while policies do not tattoo the registry on the client computer.
As I can see, you set registry via setting Set-GPPrefRegistryValue (Preferences setting). So when you disable GPO, the registry settings are kept.
For more information about differences between Policies vs Preferences, please refer to link below.
Policies vs Preferences
https://techgenix.com/policies-vs-preferences/
I am sorry, I am not the expert about PS script. However, here are my suggests about your question.
Suggest 1
Delete the GPO under the specific OU (the GPO will still in Group Policy Objects, it is only not linked to the specific OU), and create a new GPO with deleting the registry you set.
navigate to User Configuration\Preferences\Windows Setting\Registry and edit the GPO as below. Then link the GPO to OU with domain users you want.
Then update GPO to see if it helps.
Suggest 2
Modify the PS script above to remove/delete the Registry Value you want and update the GPO to see if it helps.
Hope the information above is helpful.
Should you have any question or concern, please feel free to let us know.
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Best Regards,
Daisy Zhou
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.