I see a number of factors taken into consideration here. @Supporter2025
With parents, the last thing they want is to take the parent away from the children. What they prefer to do (even after an attempt) is to provide after-care services such as HOPE. Usually, there is also a psychiatric triage number she or others can all if there are concerns.
Seeing the partner has no legal custody, the hospital will release the parent.
Another option (if the parent/s are not able to satisfactorily care for the children), is to contact child protection (if you want to go down this path). They will then see kin to care for the children while the parent gets support, OR, the children will be in a foster home.
I've seen this happen to other parents. It's not easy when there are children involved.
If you have the psychiatric triage number, you can call them and perhaps ask for their advice.
Hope it all goes well. I hear how stressful things can be at the moment.