my Mum has been on it for nearly 3 years. As really there is no prospect of her getting better then it would look likely to carry on indefinately. I think it can continue jointly with NHS continuing care making a contribution, I think this is how the xtra care my mum currently requires is funded. I just wish a cure could be found so the care wasn't needed. So really I have no idea as to whether legislation may change in the future but for now in this respect we could be considered lucky.
It's hard to say, since AIUI s117 funding in dementia cases is pretty rare. Again AIUI many (perhaps most) cases of s117 are cases managed in the community and involve conditions other than dementia. In such circumstances (eg schizophrenia, bipolar disorder) it is not unsuual for a patient to be detained under s3 of MHA83, discharged, managed either as an inpatient in a private facility or in the community using s117 funding, and for this to cease if their condition stabilises or improves suuficiently. It's hard to see this arising with dementia cases. However, if the behaviour that led to detention under s3 of MHA83 was controlled by drugs or otherwise managed, then it is possible to see s117 funding being considered for withdrawal. I've never known it happen, and a quick and unscientific straw poll among acquaintances who deal with this for a living suggests none had heard of it in a dementia case. It's hard to be more specific without more detail, but you may want to consider carefully whether to share such information.
So very unlikely, but (sadly) the unlikely can happen.