One way I like candidates to get around this issue is to separate skills into categories like (for example) "very familiar with", "comfortable with", and "experience with". It's refreshing to see honest evaluations of skill levels, rather than people who say they know C/C++ but aren't capable of coding up a basic class in C++.
I do think this is another topic that make interviewing difficult. For example, I know Javascript pretty well, I've worked with it for years. However, I haven't done modern front-end development with it in a long time, thus I don't know Vue/Angular/React or even Node. But I have created browser plugins in pure JS.
Some people would argue that I shouldn't list Javascript as a skill because I don't know the popular core libraries it's used with, and other people would have no problem with listing it. The problem is interviewees have no idea what kind of person they are going to run into.
I do appreciate when people rank their skills, but that also takes up pretty valuable real-estate on a resume. I personally leave them off of my "list" of skills, but call them out on projects I've worked on the past. For example, I don't list C as a skill, but I do mention working on embedded devices with C for previous jobs.
For example, one candidate interviewed for an engineering position that involved a lot of writing SQL/data wrangling. He listed machine learning on his resume and got interviewed by one of our researchers who lives and breaths ML and was torn apart. I didn't care that he didn't know how to do ML, even it if was listed on his resume, I was confident the candidate could do the job I needed him to. The candidate got the veto.
I'm sure other companies pull the same crap. Interviewing is just all-around awful.