Microsoft is offering voluntary exit packages to about 60,000 staff in four countries, roughly a quarter of its workforce, as AI spending rises.