I've finally figured it out. I fixed the issue by deleting every key inside HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer. After restarting Windows, folder templates on the "D:" drive were working again.
Important Note: Make sure to back up the Explorer folder by exporting it before making any changes to the registry.
Side Effects:
- After restarting, Windows showed a OneDrive ad, similar to the one shown in the Out-of-Box Experience (OOBE) when first setting up a PC.
- One drive got reinstalled on my computer even though i clicked "do not backup my files"
- Everything pinned to the taskbar was unpinned (Start menu pinned apps remained intact).
- All the apps that i disabled to launch at start up from task manager got re enabled
- File Explorer settings (accessible via the "..." > Options menu) were reset to default.
Additionally, this solution should also resolve the issue where the "Restore previous folder windows at logon" option wasn't working properly.
Reference: I found this solution in a Microsoft Community post discussing similar issues with File Explorer on Windows 11. Windows 11 explorer: problems with restore previous windows and quick - Microsoft Community