All Windows Apps including games are installed to a hidden protected folder called WindowsApps. The WindowsApps folder on the C: drive will be located in C:\Program Files\WindowsApps. On other drives on the PC it will be in the root directory of the drive, so for D:\ it will be D:\WindowsApps
To use your D:\ drive again you'll need to take control of this hidden folder on your D:\ drive, and delete it.Take a look at this guide.
Remember however, that in your case you need to take permission of the WindowsApps folder on D:\ drive, there is no need to change anything on the WindowsApps folder on C:\ drive. Everything else in the guide is the same
https://www.intowindows.com/how-to-access-windo...
NOTE: This is a third party link that is not Microsoft's property, so you might encounter advertising on the website.