I'm working temporarily in the US, but I'm from the UK. I have a Health Savings Account (HSA), which works similarly to a retirement account (penalties for withdrawals before 65, free thereafter; tax-free growth etc.) with the added bonus that withdrawals for healthcare expenses are tax-free at any time. Many sources recommend contributing to HSAs as much as possible, even before contributing to traditional retirement accounts.
My question is: how would an HSA be taxed in the UK? Would it be recognised as a retirement account/pension for tax treaty purposes, i.e. growth and withdrawals would be tax free? Or would capital gains/dividends within the HSA be taxable?