I think above a certain threshold of “stats”, it boils down to research interests and luck. If the people you have a good fit with aren’t accepting students from the 2020 cohort, you’re SOL. However, the person who may rank slightly below you stats-wise may get an invite because that person wants to work with a PI who is desperate for students, so is accepting upwards of 2 students from 2020, etc.
One of my best friends and I both applied to UCSF and Berkeley. We have worked in the same lab for the same amount of time, and we edited each other’s papers, applications, and our stats are extremely similar. The only difference in our apps is research interests. However I got an invite to UCSF and got rejected from Berkeley while the opposite happened to her. i think the key takeaway is that you shouldn’t give up because your “stats” are not the best, or because you are getting rejections from a couple schools. If even one person likes your application and thinks you are a good fit, it means you have a chance!