If you think you're about to enter a situation where this could be an outcome, for an iPhone, mash the side button, or hold the side button and volume up for a couple seconds to bring up the 'slide to turn off' screen. That will disable the biometric unlock and the passcode is needed to get back in.
Of course, it's sad it has to come to this, as this is effectively a warrantless search.
Of course, it's sad it has to come to this, as this is effectively a warrantless search.