S, X, and Z randomly stop working

For the past few days, out of nowhere, these three keys have been erratically nonresponsive to me. Sometimes they will work normally for five minutes and then randomly shut down on me. I've tried going to Device Manager and deleting the keyboard, restarting my computer, removing the key caps and cleaning it, and looking up multiple tutorials, but nothing seems to work. I don't believe these keys are completely broken, since I've found two ways in which they can function:

- Spamming them with extreme force (along with the other keys)

- Pressing another key at the same time as one of the broken keys (can be literally any key on the keyboard; seems to work just fine indefinitely but only as long as I hold down the functional key)

Obviously, neither of these options are viable in the long term so I was just wondering if anyone has had any similar issues with their keyboard and how to fix it? I'm not an expert on computers so I honestly have no idea what to do.