Failed care home assessment

For issues specific to caring for someone with dementia.
Mum is wandering regularly now , I have door alarm and GPS pendant for her. She lives with my father who has vascular Parkinson’s and is totally immobile so he can’t look after her. On Saturday she went out in the rain without a coat and was soaked through and distressed when I picked her up. I bathed/hair washed her and put her in her P.Js later that night she went out again and wandered for 2 hours until picked up from a main road and police called. The door alarm went off but Dad told Careline she was in the front room! This was at 8.30 p.m and I didn’t know anything till gone 10.00. This was the 4th time in a week she went out. She had a care home assessment Monday and I was phoned to pick her up early as she was agitated and they couldn’t fulfill her needs. Obviously she doesn’t want to go into a care home although she doesn’t even recognise her own home anymore. I feel so guilty that the doctor is on about sectioning her but also I know she could cause an accident and injure/kill motorists and indeed herself... unfortunately Mum resents the carers trying to help her and is often rude to them won’t let them help her to dress etc. How do I know I am doing the right thing by her going into a care home... I feel I’m failing her😢
Mum is clearly in need of specialist support. Has she had a brain scan to see what the cause is?
This should be the first step,

Sectioning might well mean that she gets a scan immediately, and it might give her entitlement to FREE residential care for life - probably in an EMI (Elderly Mentally Infirm) residential home.

This is not my area of expertise. I'd suggest that you rang the Alzheimer's Society this morning and explained the situation.
Ruth
You are not failing your mother. Her needs are more important than wants. In a home she will have 24/7 care. Its no ones fault she is now so confused. Sectioning isn't a punishment! Its a way of making your mother safe. You are doing your very best and more.
Ive been through similar with my now late husband and I feel your pain.
Take care of yourself