Most residents in care homes are "prisoners" in a way, as they won't be allowed out unsupervised - it's for their own good.
I have a very close family friend who developed vascular dementia, after suffering from a heart attack.
She went through a stage of trying to break out and on one occasion she was successful. I received a phone call from the care home and ended up chasing after her for 2 - 3 hours, until she found her way to the local hospital She'd convinced herself that she was being forced to stop in the home against her will and she went the hospital to try and prove she was not ill.
Cut a long story short, the police were called in case she didn't go back to the care home, but fortunately the hospital staff appeased her and she went back to the home voluntarily in the police car, thinking she was just getting a lift off them.
It's really difficult to understand what's going through the mind of someone who suffers from dementia, but I'm hoping that the staff at the care home next door to you won't be doing anything to be causing them to scream.