I was having this issue for a very long time. In my case, just sharing a probable reason that helped me, it was a (lock symbol) button that was on the top right corner of my MSI keyboard that didn't allow my window button to work. I found out b y using a keyboard tester online, and checked that each button sent a working signal.
Hope this helps some of you out there in the future.