I can tell you why you’re not being hired but you know already.
People like to hire people who look like themselves and fit in with the group. My experience with that was when I moved into the “white, male, over 40” group. I didn’t look like a typical software engineer anymore (a young person’s profession), I didn’t fit in with the group, and I wasn’t adding any diversity points. (Age doesn’t count as diversity, it’s just age.)
The saving grace is that my profession is performance oriented so if you know things that others don’t know and you can solve problems that others can’t solve, which is demonstrable at interviews, you can get hired.
I do not have a solution to your problem but I wish you the best.