Unlock iPhone when screen unresponsive
Solution!!!! I just unlocked my iPhone 12 using voice control
So my iPhone 12 was locked with passcode required to unlock and allow for FaceID. Whilst my screen has no visible signs of damage (no cracks), it has not been responding properly for the last 24 hours, and I noticed it had been getting worse. This meant that at least one row of numbers on the enter passcode screen would not recognise being selected and so I had no way to unlock my phone without some sort of data loss (my last local backup was only a week ago so not a huge deal if I needed to do a reset, but I really didn't have the time). I searched for solutions and one suggested using Siri to turn voice over on but I couldn't figure out how that was supposed to help.
I then remembered that there's a voice control function, so I asked Siri to "turn voice control on", which it did. The passcode screen then had all this little numbered flags, beside everything on the screen, including the passcode numbers (note: these numbers are different from the the passcode button numbers). So I said the number of the little flag beside the corresponding passcode button and it selected the passcode number. So I repeated this for the rest of my passcode and my phone was unlocked. For example, let's say the passcode's first digit was a 3 I would say "13" and 3 would be selected. Note that the numbered flags would change after each number entered. Hopefully this makes sense and can help someone in the same predicament.
iPhone 12, iOS 18