Pro tip, if you suspect the police are going to take your phone, turn it off. As far as I am aware, finger print and face id do not work on initial startup and they can't compel you to enter your pin without a warrant.
If you have an iPhone, holding down either volume button and the side button will bring out the Medical ID, slide to power off, Emergency SOS screen. This will also disable FaceID. Password will be required to access the phone now.
Double check this in the state or country you're in. I recall something from a few years ago where the police could force you to give a swipe pattern and maybe pin since these items are not covered in the same way that a password is.
Maybe in some countries but in a western one they aren't getting a pattern or passcode unless you verbally give it to them. We do know though that there is some level of capability to crack phones though.
Indent to find an article to back up what I remember and in 2020, a woman was held in contempt of court and jailed for refusing to provide a passcode. The case was later overturned.
It's the other way around. They can compel you to use your fingerprint or face ID. They cannot compel you to use a password (which includes a swipe pattern) without a warrant.