I have similar experience with oneplus nord where the power button just becomes nonfunctional. Correct me if am wrong here, does the power button taps exactly like it used to when you first bought your device? because when you say bug, it should only mean an error from the software side. But if the button and the soft layer that fails to tap inside the board, it may be a faulty issue. tell me did you drop the phone even to the slightest on any surface. usually when phones do drop even from a feet away distance sometimes those delicate layers slip inside which causes so much problem. I had to take away my old oneplus nord as (the oneplus denied served under warranty) to a third-party service and it was notified to me that the rubber tapper inside is broken. and when I hold that rubber strap it is of such an ugly quality it turned into multiple pieces the moment, I just squeezed it. if the issue is not with software behaviors kindly do check it out with the button functionality at nothing service asap. But if it is a software issue you are facing, I would only recommend using tap to wake option on the phone to avoid the button pressing all the time.