My case didn't involve a gap of a few years between initial applications and eventually getting a role, but I did apply for (and get rejected from) a lot of roles before I was accepted to one, so it might still fit the spirit of your question.
I learned about EA in 2018, and started applying for EA-aligned roles in 2019. I applied for ~30 roles that year, ~25 of which were at EA orgs, most but not all of which were research or research-ish roles. Some were things like internships, but most were jobs.
I ended up with 2 offers, both jobs at EA orgs. One was an operations role and one was a research role. I took the research role.
In contrast, in 2020, with some EA research experience under my belt, I applied for ~11 roles at EA orgs (mostly research roles), and ultimately received 4 offers (all research roles).
So I got ~28 rejections before my first EA-related job offer, but then I got one, and since then I've been very happy with how things have gone.
I say a bit more about this process here, and about how I "got up to speed" on EA ideas here (which was probably part but not all of how I ultimately got these job offers). I also collect some readings and notes related to doing high-impact research here. Hope some of that's helpful!
And I also endorse Khorton's comment that the EA community probably overemphasises working at EA orgs. I'd add that it probably overemphasises research roles too. (I of course do think that research roles and roles at EA orgs can be highly impactful, and that some people should be doing them! I just think many other things can be highly impactful too, and will fit some people better.) So I think EAs who haven't yet tested their fit for many things should probably consider and apply to a lot of non-research roles and roles outside of explicitly EA orgs.
I never had to ask anyone's permission to do EA-related research.
I just worked hard in my free-time for over five years and then finally was able to have enough reputation to co-found my own research non-profit (Rethink Priorities). I totally understand this path isn't accessible to everyone (or even most people) but it is probably more within the grasp of people than they might think and I think it's worth some consideration.
I think a great place to start is just making thoughtful EA Forum posts (perhaps aiming to emulate good reasoning transparency and the style of highly upvoted posts) and trying to talk with other thoughtful EAs.
Even if you don't go on to co-found your own research non-profit, this portfolio you build will almost certainly either get you noticed by a recruiter or boost your application when you do apply.
Well said Peter. I needed this. thanks!