Please understand that this forum focuses on the Intune related issue. For turning off the retail demo mode on surface duo, it is out of our scope and I am not familiar with it. At such situation, we highly recommend you post contact surface duo support to solve this problem more effectively. Here is the link:
https://learn.microsoft.com/en-us/surface-duo/contact-surface-duo-support?tabs=online
By the way, you can refer the following guide for Surface Duo enrollment after turning off the retail demo mode: https://learn.microsoft.com/en-us/surface-duo/