The number of unemployed people looking for work more than six months has surged to its highest level since 2021.