iPhone's power button doesn't lock, shows Swipe to Power Off instead My iPhone SE, running iOS 12.4 reached its lower battery limits and went dead. I, foolishly pressed power button and then it stayed in an Apple Logo screen → power off → Apple Logo, loop for a while till I could get hold of the charger. After plugging in and letting it get some power, I observed the following: 


It vibrated 3-4 times as if I removed and plugged in the power again which I didn't. 
Pressing the power button once shows the Swipe To Power Off screen after a second or so. Doing it twice gives the same result. 
To be able to lock it, I use the assistive touch method but that works only when I tap the Lock Screen  icon twice. 


How can I get my power button to start locking the screen again ? 

Is there anything else I can do except connecting the charger, if it goes dead again, to power it up ? 

I bought it 2.5 years ago, and don't have AppleCare. Its battery capacity is 94%.
The button seems to have fixed itself. I used assistive touch to lock it 


Locking an iPhone if button is broken?


and kept checking if power button is working or not. Often it shows the swipe to power off screen, but that's okay. Somehow battery capacity became 84%.