Dani could have survived with a simple altercation of the plot-
Miles and Rebecca get tucked away in a dream and Peter Quint takes control of them. Flora gets tucked away when Rebecca takes control of her.
But Dani? She is still in control. Because Viola doesn't have any memories. She can't control Dani. So Viola goes dream-hopping. She remembers her heartbreaking past. She's tired, and lonely, and so her stubbornness fades away in place of sadness.
Viola's spirit finally leaves for whatever comes after death. And Dani and Jamie tell the ghost story at Flora's wedding together, still inlove and happy, but Dani's eyes are both blue and her head is clear without the spirit of Viola with her.
Ok, so y’all over at Ted Lasso have spent all of season 3 dressing Jamie like Faith-era George Michael and now you’re dressing Dani like Maverick and I’m not supposed to think these two aces are bi as hell?