If she is being offered a 2 bed temporary flat that will be because it's for her and DS. If she does not stay in the refuge she risks losing him, and she will lose the flat too if he's not with her.
I was in a similar situation, and this was all explained to me but that it had to be my choice. It wasn't really a choice though. It was a choice between being with my DC in the refuge, and being in a homeless hostel for single adults a few months down the line, if that makes sense?
Yes she could fight it, and living in refuge is not easy I know that, but for me it gave me the distance and separation I needed. The spell I had been under lifted and even though it was one of the most stressful and difficult times of my life, I now have no social work involvement, live with my DC settled in a new area, we are safe from my ex and healing from the abuse. It was hard but so necessary.
Social services don't directly tell people what to do, but they give you hard choices and there is definitely a right one. I have seen women leave refuge and lose their DC, but I haven't seen any women who stuck it out in refuge who lost their DC. It did feel like I lost my civil liberties and my agency as an adult, a woman, a parent, but sometimes we have to temporarily give up our freedoms to live as we want, to be free from risk of harm.
I really hope your daughter sees sense, but whatever happens do everything you can to be present in your DD and DGS life. Whatever choices she makes, they both need support and love and family. And family support is one of the things SS take into account as a protective factor in not removing children from their parents care.
They might be able to find a way to improve your housing situation so he can come into your care instead of going into the system too, it would be easier and cheaper for them to try and find a suitable Home for you all than to place him outside of his family.
The 20hrs of prison visits is concerning because 20hrs is a long time for them to get in your head. I didn't speak a word to my ex, changed my phone number and everything, but even receiving emails or message requests on Facebook set me back and put his voice back in my head. Previously, when I had tried to break from him he had been on the phone and would undo anything I did to try and change the narrative. The gaslighting and lying and manipulation was so strong it felt like my Brain didn't even work. Now it baffles me why I ever believed him, but these men are incredibly good at what they do. Whatever she does, she is not in her right mind right now. That's on him, not on her. She is not herself right now. But hopefully with your guidance she can be herself again and see the truth once more.
All the luck in the world.