However, starting around 2016, finding work started to become difficult. The work I did find was no longer enjoyable. It took a few years, but I finally did enough self introspection to realize: it's not them, it's me. I aged out of the industry. I didn't notice it in the moment, it just happened.
I cannot work in open-office fishbowls. I cannot stomach Agile process and how it has turned something I love into menial factory work (N.B. I get it, your [A|a]gile shop is awesome. I only had such luck once). There are many more things about modern software development shops with which I disagree.
Now, it hadn't occurred to me until later that this was showing through in my attitude. Of course, I really did not want to work on the 500th BBA in my career with six Scrumm Masters all demanding 30 minute meetings every morning. I did not want to write more JavaScript or deal with yet another hotness-of-the-week library that does the same thing as the previous 10 such beasts. I did not want to play Schedule Chicken yet again.
Is it my age? Sure, people change. I'm not bored with the programming I enjoy but I did grow bored of modern corporate software slave shops. Hey, more power to them. It's their shop; they can do what they want.
However, it does mean I have to move on. I'm not saying any of this is true for the OP. Just something to ponder if you're constantly facing rejection.