The legal precedents that have been set in this area basically boil down to this: if the police could unlock your phone while you were unconscious (e.g. by placing your finger on it or pointing it at your face) then they are allowed to do so.
You cannot be legally compelled to reveal your password or unlock a device with your password. Obviously you could be forced anyway, but evidence collected this way would be inadmissable in court.
If you're concerned that might be about to happen you could just hold the power button until it shuts down or reboots, Android always asks for the password at boot AFAIK
Should it arrive to that they can still seize your devices and also force you to unlock your devices biometrics or patterns/passwords regardless. I wouldn't trust law enforcements in this regard.
PSA: Stock Android phones, since... maybe Android 12.x or so(?), have a Lockdown mode in the power button shortcut menu that disables bio unlocks and forces pin or password.
Because generally the TSA in Yankland are overly aggressive, but to be fair it can happen anywhere and here in the UK if they snag you into the backroom and want to search your phone you're screwed either way since they, can.