Or we could just cut straight to the chase and put a microchip in them.
A microchip is too small, it can't have the range needed.
This is exactly what exists, the article covers this towards the end.
I think an AirTag in a shoe would be best. Also a good idea for little kids.
I've hot glued AirTag to their shoe. Dementia is not a simple problem. This solution works in some of the stages of dementia. At stage 5 they don't even wear shoes when they wander off.