I also had the duplicate onedrive in explorer problem and tried various recommendations other than editing the registry,
What finally worked was
1. go to onecrive settings and Unlink This PC then Unlink Account
2. uninstall onedrive and restart PC
3. download and install onedrive setup from Microsaoft
4. Restart pc
5. log back in to the onedrive app with my windows account.
My windows 11 pro version is 24H2 Build 25100.3037 Experience Pack 1000.26100.48.0
Onedrive is 25.010.0119.0002
Once OneDrive was backup and running I saw that some files that had been moved from onedrive root into subfolders reappeared in the old location so the duplicate entries is not completely benign. There may be other issues but nothing has bitten me yet.