Can they force you to look at your phone though? Attention aware Face ID requires eyes ball on screen.
And as others have stated, holding volume up and power u til the iPhone vibrates locks the phone requiring the passcode.
Five quick presses of the lock button does this too, but beware as I think the default behaviour also starts a 3 second countdown to calling emergency services.
Pressing the power and a volume button for >2s (the same combination as shutting down the phone) also disables faceID and does not call emergency services.