The tag works in the app but not from the lock screen
Expected behaviour rather than a fault, for different reasons on each platform. Reading a tag from inside an app is a deliberate act with the screen on. Reading one without opening anything is background reading, which has conditions and, on iPhone, a model requirement.
Two different modes
Inside an application, the app has asked the system for tag reading and the user is present and looking at the screen. Everything is explicit.
From a locked or sleeping phone, the system is deciding on its own whether to look for tags and what to do with one. That is a different feature with its own conditions.
A tag that works in the first case and not the second is telling you about the phone's background behaviour, not about the tag.
On Android
Tag dispatch generally requires the screen to be on and the device unlocked. A phone in a pocket with a dark screen is not looking for tags.
The exact behaviour varies between manufacturers and versions, so a rule that holds on one device may not on another.
NFC also has to be enabled, which is a setting that can be off with no visible sign until a tag fails.
Test by waking and unlocking the phone first. If the tag reads then, the behaviour is normal and there is nothing to fix on the tag.
On iPhone
Background reading is available from the iPhone XS and XR onwards. On earlier supported models an application has to be launched manually to read a tag at all, which is exactly the symptom described.
When background reading does work, the result arrives as a notification rather than as an immediate action. If the notification is not tapped, nothing further happens.
Take NFC Tools. On iOS it requires an iPhone 7 or later running iOS 15.6 or later, and the app must be launched manually. Background reading is available from the iPhone XS and XR onwards.
So a tag that works inside the app on an older iPhone and does nothing from the lock screen is behaving exactly as that model does.
Designing around it
Assume the tap is deliberate. Public deployments work best when the person is holding an awake phone and intends to tap something.
Say what the tag does. A short printed instruction removes the ambiguity for someone whose phone does nothing because it is asleep.
Do not build a flow that depends on a locked phone reading a tag. It works on some devices and not others, which is the worst of both.
And test on an older iPhone specifically. It is the device most likely to produce this symptom and the least likely to be in the pocket of whoever tested the deployment.
Frequently asked questions
Why does my old iPhone need the app open?
Background reading is available from the iPhone XS and XR onwards. Earlier supported models require an application to be launched manually.
Does Android read tags with the screen off?
Generally not, since dispatch usually requires the screen on and the device unlocked. Behaviour varies between manufacturers.
Is this a fault I can fix on the tag?
No. The tag is behaving identically in both cases, and what differs is what the phone is doing.
Why does iOS show a notification instead of acting?
That is how background reading works there. The notification must be tapped for anything further to happen.