Alibaba Group Holding Ltd. cut its staff by roughly 20,000 over the course of 2023, adding to a spate of layoffs spanning global tech companies from Silicon Valley to Hangzhou.