I must call your bluff.
I have a MSI GF75 that came with Win 10. Battery charged properly and everything worked fine. I upgraded to the Win 11 when the annoying pop up kept popping up, and low-and-behold, exactly what Rajeev mentions happened to my brand new laptop. So I followed all your steps. And nothing got the battery to charge while plugged in. So I went BACK to Windows 10 using a flash drive with the OS on it since Microsoft disabled my option to return to Win10. And what do you know? The battery starts charging correctly.
Fast forward to yesterday and Win 11 was forced onto my laptop (same laptop a year later), and it installed. Guess what? The battery will not charge while plugged in.
This is most DEFINITELY a Windows problem, and Rajeev is correct, Microsoft must do something about this issue.