I am assuming here that you have not been able to uninstall CSM and may want to (if only for now

). In which case the following may (I emphasise "May") give a result.
If not done already, try going to Power Options in Control Panel, select "Choose what the power buttons do" and under "Shutdown settings" uncheck "Turn on fast start-up (recommended)". Then reboot and try the uninstall again.
This should prevent the PC doing a hybrid boot and the system resuming from the state it was in when last shutdown; a hybrid boot may be what is frustrating an uninstall of CSM which modifies the OS.