Sarah - it doesn't always need to be rectified as there's nothing 'wrong'. The property is registered with both tenures and in the same names and with a mortgage covering both. As such when you complete on the sale the buyer may, if they wish to buy both tenures/titles and request 'merger' when they register. A merger, if requested, would close the leasehold title and leave just the freehold.
If for some reason you want or wish to close the leasehold title before selling then PG 26 section 3 explains how. Although you'll need to work with your lender and a conveyancer to achieve it -
Practice guide 26: leases – determination - GOV.UK
Land registration is complex, designed to protect legal and financial interests in property. There can be significant consequences for any error. Please consider seeking legal representation. Before making an application without legal representation, It is important to
consider the benefits of using a conveyancer.