You need to be a bit tricky. Your phone can either require a yubikey or not. You have two pins, 1234 that doesn't require Yubikey and 2345 that turns the phone into yubikey required mode. So what you do before crossing the border is you type in 2345 yourself and turn your phone into yubikey required mode. And if you forgot and the customs agent types in 2345 even though 1234 would have opened the phone without yubikey, nobody can prove you didn't do the 2345 before entering customs. In practice if you give the customs 1234 and are nice to cbp you get your phone back in 48 hours, just make sure you get the email address of the agent in charge not just name and generic phone number.