It depends so much on the circumstances. And they would also have to prove to some degree that it was intentional.
I can only really speak for Sweden. They can forcibly use your fingerprint or face to unlock it. But you are under no obligation to give up a password to begin with.
It's also a question of if they have officially confiscated it or not.