I’d love to say there’s an escape… but I’m not sure there always is one. The best you can do, if finding another job is not an option, is pick your battles and defend the 2 or 3 things most important to you in any design. A project you share with your team, and the client, will always have to be full of compromises - some of which you won’t agree with.
But if you what you REALLY yearn for is complete creative freedom, then perhaps you can develop a side project of your own. When I was working at an agency, my personal website became an important place for me to stretch my design legs. I usually came into work an hour or two early to work on it, and did little bits throughout the day when I had a chance. Every little bit counts, and probably helps stem the tide of creative frustration.