I assume this is "Managed Payment to Landlord" (MPTL) for the tenant's Universal Credit and/or Discretionary Housing Payment, as opposed to for "Housing Benefit" per se, since most people are now on UC instead of HB. But in any case the period of imprisonment is long enough to affect Bob's eligibility.
Under the Universal Credit Regulations 2013, Schedule 3, Bob is no longer occupying the property since their absence is expected to be for more than six months; in fact, they lose UC entirely and are meant to reapply when they get out. If this is Housing Benefit then the entitlement ends for being expected to be in prison for 13 weeks or more; see the Housing Benefit Regulations 2006, regulation 7. That's a generic rule for absence, whereas there's a 52-week allowance for pre-trial custody, and some variations for release on probation. DHP top-ups from the local authority follow the same rules. In any event, 2.5 years, even taking into account the anticipated release at the halfway point, is more than any of those thresholds.
The claimant is meant to report changes of this kind, but since Alice are receiving the money directly, she is also responsible for informing the government of any relevant changes. See guidance at 10.2,
Whilst a MPTL is in place the landlord must notify the department of any changes which a landlord can be reasonably expected to know which might affect the claimant’s entitlement to Universal Credit and the amount awarded. For example, the claimant changes address.
When a claimant changes address the MPTL APA will cease from the end of the assessment period before the claimant changed address.
If your tenant moves home and you need to end a MPTL, please contact the service centre immediately on 0800 328 5644.
As noted below, and following the Social Security Administration Act 1992, sections 71 and 75,
If the MPTL is overpaid due to a change that has not been reported by either the claimant or the landlord, the landlord may be asked to repay the overpaid benefit. Universal Credit payments are made every calendar month and take account of changes during that month.
It may be that Bob has already done their side of things but the system hasn't caught up yet. In any case, Alice is not entitled to continuing payments and the government has various means to get the money back.
Sections 111A and 112 of the 1992 Act (which applies to UC as well) make it a criminal offence for Alice to fail to notify the government about a change of circumstances that affects her right to receive payments. (Simplifying the statutory language a little - Alice is "the recipient" in the context of the full text and Bob is "the claimant", and there are various other conditions about your state of knowledge and intention.) This is not to say that it would necessarily be pursued as a criminal matter, but that possibility exists in principle.