When they arrest you, they have physical control of your body. You're in handcuffs. They can put your fingers against the unlock button. You can make a fist, but they can have more strength and leverage to unfist your fist.

There's no known technique to force you to input a password.

Are we not talking about a legal difference? That was my reading.

The law follows practicality in this instance.

Yes, my statement was related to legal means. I’m not a lawyer.

Well there is one known technique. https://xkcd.com/538/