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.
W