It's one of the most stressful things - worrying that a loved one will get lost. It only happened twice with my Dad - the first time he simply went out the back door of the doctor's office looking for my Mom and me (we were in with the doctor) and my niece who was supposed to be with Daddy was looking at her phone (!) and didn't pay attention. I came out and couldn't find him - found him out in the parking lot though - he had walked over to the next parking lot - concerned for us.
The second time involved my niece also - she was waiting for her mom to pick her up at my parents' apartment and said she would wait instead out by the main entrance. After awhile my Dad got worried as he hadn't heard from my sister that my niece had been picked up. So he walked out there. When he didn't see her he kept going out onto the main road and turned the corner to the other main road. At that point he couldn't figure out how to get back home. This is where divine intervention came in - the daughter of the woman who lived across the hall from my parents was driving down the road and saw my Dad! Recognized him (and Jackson, his dog who was of course with him and trying to get him to turn around) and picked him up and brought him home.
I feel so blessed that neither incident ended up in disaster. Dad wears an ID bracelet, and if he had been out on his own more at that point I would have gotten him a GPS tracker.
The key thing is that both times he was going somewhere - he was looking for someone. He never just "wandered" off for no reason. I really dislike the term "wandering" as it makes people think that people with dementia wander aimlessly. In my 35 yrs experience, there is always a reason in their mind why they are going somewhere.