The economy has come through the initial impact of the Covid-19 pandemic in better shape than expected but faces a tougher and longer road to full recovery, according to the Treasury.