The debt is considered discharged at the end of the period of bankruptcy.
Assets held at the point of bankruptcy can still be realised post-discharge will still be used to pay creditors, including HMRC. The process doesn't stop when the bankrupt is discharged.