I have this problem periodically (2020 Model 3, and then 2022 Model Y), and over 3 different models of iPhone. I am convinced that it is a bug in the iPhone’s Bluetooth LE implementation. When this happens, waking the iPhone’s screen instantly unlocks the car. For me it has come and gone with various iPhone iOS update versions. I have had similar periodic trouble with other Bluetooth LE devices not responding with the iPhone is asleep, which is why I am convinced this is an iPhone bug.