I had an iPhone 5S that did the same thing. It was thanks to the god awful replacement screen I bought. I haven’t resorted to repairing it since I bought a Galaxy S7 after that happened.
open