Almost 18,000 of the students who graduated in 2022 claimed out-of-work benefits in their first full year out of university, official data shows.