The Universal Credit Regulations (Schedule 3)
state that a claimant who is expected to be away from their home (or is away from home) for 6 months or more will not be treated as living in the property ie no Housing Costs Element will be included in their claim for Universal Credit.
So if the claimant is away from their home for less than 6 months - then regardless of the reason for the absence* - they will still be treated as living in the property and therefore entitled to a Housing Costs Element when their UC is assessed.
Whether Universal Credit will continue to be paid will depend on whether they continue to meet the other claiming criteria including their claimant commitment.
Please click on the links below for more information.