Almost 170,000 retail workers lost their jobs during 2024 after a challenging year for high street firms, according to data.