It's difficult
My mother was in the hospital recently and I also had difficulty making an exit; she often was confused about where she was and where I was going and would get upset about not coming with me, or her thinking she needed to go somewhere, etc. She did also have confusion about not being able to walk me out, like your mum, Buddha. (My mother was on a locked ward.)
The two things that worked best for me (and they may or may not for you, you have to do what works for you!) were:
1) sometimes she would say something like, well, it's time for you to get going. Even if I wasn't finished with the visit, it was better if I left when she said that. (Obviously this wasn't an option if I was waiting to see the doctor or similar, in which case I'd distract her with "oh, I want to wait until traffic is better" or something like that.)
2) although it was very hard for me to leave without saying goodbye, it was often better for her. I would just say I was going to the bathroom, the staff would distract her, and I would make a discreet exit. I had to come to grips with the fact that she would quickly forget I had been there and the leave-taking was much worse for her if she knew I was going.
So I am advocating the little white lie or the "love lie." It's hard to do, especially at first. However, my goal is to spare my mother as much upset as possible, and so sometimes convenience and calm trumps the truth. If you do decide to try this, what works best with my mother is to keep it short, keep it simple, and whatever phrasing I use, repeat it verbatim.
I hope you are able to find a solution that works for you. It's really, really hard and it's really, really awful and I'm sorry.