I had a boss who would not change and who I could not change myself in ways to make his changing more possible, etc. and one day my T pointed out that if nothing could change (me or him) then I would become depressed; that was the only choice; quit or become depressed. That was startling to understand but I also felt that my work was not just this relationship with my boss, there were other reasons I was working there, other things I felt were good for me and that I was learning so I opted to stay and, a month or so later, my boss actually quit/got another job
That was about the same time other things were changing at work; I made a dumb statement to the owner that he only needed me about 2 days a week, he just didn't know which 2 days (the bad boss didn't do his work on time/had to be yelled at by the owner to get it completed and when I got it, I was super efficient and got it done "on time" despite a late start) and I was suddenly put on part-time status. I was also beginning to terminate my therapy, it was within 2-3 months of ending and I made some comment somewhere and a supervisor picked up on it and they instantly hired another person to learn my job from me so I put in my actual date I was quitting.
Things can change even when they don't seem like they can.