I found a fix for this problem.
- Open Devices and Printers in control panel
- Right click Apple MagSafe Charger and open properties
- Go to Hardware tab
- Select HID-compatible-vendor-defined device (1st one worked for me)
- Click properties
- Click Change settings (if applicable)
- Go to driver tab and disable the device.
- Unplug and replug the MagSafe
That's it and charging started working for me again.
Holy balls, This fixed it for me too. I purchased charger back in October 2021 and worked for 1-2 months or so, then stopped. I could not figure out what the heck caused it to stop working in Windows. Thought it was my USB-c connection but it worked fine in BIOS so led me to think it was something in Windows.
I had given up after a couple weeks of trying things off and on and gave up. Glad I tried searching again today for fix after like 2 months of having given up.
Thanks for posting solution.