If she were to quit or get fired they just wouldn't use the character at all, but I don't think she's going to quit, any more than other MCU actors have quit over disappointing movies... which is a lot of them lately.
She'll be taking some time to make serious movies and hopefully when they have another part for her (when they're allowed to write and act again, I mean) it's better. Same with Benedict Cumberbatch or Chris Hemsworth or Samuel L. Jackson other actors whose most recent MCU projects didn't turn out as well as hoped.