Chosen Solution

I am working on a Galaxy a12 for a customer. I replaced the LCD because the phone got bent in his pocket and damaged the display. After replacing the display, the phone randomly locks and goes black. When the side button is clicked it’s back on the lock screen. Could this be caused by a faulty side/power button?

Since you replaced the display, you try another as it may be defective. I doubt that a faulty power button would cause this issue. With the phone having been bent before, that could cause board damage that may cause this issue. Otherwise, I have seen that when a phone’s storage gets full it can cause weird issues like this.