A GrapheneOS is most likely completely secure in BFU state [1]. So just switch the phone off or reboot it and don't enter your PIN. It is very unlikely that law enforcement is able to decrypt the phone and it does not put you in murky legal terrain, because even an auto-wipe is intentional (IANAL).
[1] This is in contrast to many other Android phones outside Pixel and Samsung flagships, because they are too cheap to add a secure element, which iPhone has had since 2013 and Google Pixel since 2018.