I've repeatedly wished for a mechanism integrated into a phone that allows displaying one or more documents (e.g. QR codes, tickets, some other form of document to be displayed) while having the phone otherwise locked (in lockdown mode, so a password is required to unlock it). That would make it much safer to display a QR code on your phone without the net effect of having your phone unlocked when going through security.
Until then, I'll continue to print such things out on paper.
This seems to have been the case on older Android (the "Quick Access Wallet" setting introduced in Android 12), but if that still exists on current Android 15 I haven't found it.
Why until then? Print in any case. It is an excellent way to have all of your important travel documents separate from your smartphone. Use you smartphone as the backup, not the other way around.
Until then, I'll continue to print such things out on paper.