Yeah seems like some kind of tracking device is a requirement for people with advanced dementia. Have had a couple of friends whose grandparents have disappeared; one of them was found dead the other one...is still being looked for. Is there any reason we can't use gps tags of some sort, other than privacy concerns?
You can buy safety pendants that contain a GPS tracker hooked up to the cell network. It has an emergency button and can be located through the service's website. Some even have a speaker and mic so you can talk to an agent through it. I'm sure they could add a feature where if the pendant is a certain distance from home then have an alert go out to a list of contacts. Buy two of them for grandma if you really want to make sure that she is never not wearing one.
Apple's HealthKit/ResearchKit was extended (maybe 2 years ago?!) to include geo-fencing for basically that use case. Will try to dig up the article or github repo in a bit...