I am so sorry you are having this terrible experience. You deserve better, as you know. You are right to plan to get out of there as soon as you can. With this behind you, you will be better equipped to know what to look for when you start looking for employment as a developer again. When I get really down about this issue, and also the lack of racial diversity in tech, I find a smidgen of comfort in reminding myself that this will play out in the marketplace. Diversity does matter. Companies with diverse leadership and employees are better places to work, have happier employees, and make better products. The companies that don’t figure this out will fail. Not soon enough, I know, and probably not painfully enough, for my taste, but it will happen. Like I said, just a smidgen of comfort.
For context, I am a female software developer/engineer and have been coding professionally for almost 20 years. Hang in there.