If you absolutely have to hand over your phone, turn it off completely, like hold the power button and then tap the off icon. That will dump any keys out of RAM, which is why it always requires the full password to unlock when you turn it back on.
Both in terms of how your phone works and the leaks we've seen, the cracking tools the police have are overall significantly less likely to be successful when used on a phone that's been turned off and not unlocked since.
Also, IIRC iphones have a feature where they will dump at least some of the system keys from RAM if you push the lock button five times. I'd still trust fully off more but that's easier to do covertly.
Additionally, with the Pixel 9 holding down the power button no longer turns it off, you have to press power and volume up at the same time to get to the power menu.
There's usually a hardware level power off function for when the device freezes and stuff. Can usually hold the power button for ~10 seconds will power off the device without needing to look at the screen
It's not about guilt. It's about whether or not you know the password. In most cases not knowing the password will be deemed improbable because the chances are extremely low. You'll have to provide a scenario where it becomes probable, and said scenario must be deemed probable as well.
Incidentally, the European court for human rights said that that law violated the ECHR convention.
The UK said "yeah, so what?", which since they've left the EC it's legally right, but it's not a great outlook when you're told your laws violate human rights.
Even for a number of countries where it's not technically enshrined in law, police can still effectively do it anyway, by detaining you for as long as they like until you comply.