That's the reason most big name actors have their own production companies to work on their own movies, you have way more control over your own role compared to being just another actor on set.
In any case, I think the audience still recognize great performances by individual actors even if the end product is badly reviewed or didn't do well at the box office, and there are lessons to be learned from the "Suicide Squad" and "Amsterdam" and "Babylon" until you finally get a "Barbie" against all expectations.