That's actually what she did. Multiple times.
Look at her comments about trans people for example.
Gina Carano was not "cancelled" for one incident or one bad "opinion". She was fired for a pattern of problematic behavior. There has been rumours about her getting fired for months. I would speculate that Disney told her to knock it off multiple times and she did not.
As I said, she only has her own stupidity to blame. Once again, as I mentionned previously, it has nothing to do with a "stupid opinion", she is spreading lies and hate. That's why she was fired and that's why she deserved it. People use freedom of speech very easily, but they do not even understand what it really means.
Disney has every right to sever ties with her because her opinions don't represent the company, but she's being misrepresented to excuse it, which isn't right, IMO. Take the reaction to her historical analogy that got her fired. Lucasfilm and many major media outlets labeled it as "anti-Semitic." It was ill-advised, maybe insensitive, but certainly not anti-Semitic. Denying that the Holocaust existed or was bad as it was is anti-Semitic. She did the opposite and used the severity of it to clumsily make a point and show solidarity with Jews. People need to make up their mind about what the term means instead of just deciding that someone with different opinions who references the Jews is automatically being Anti-Semitic.
Moving onto what you just accused her of... she didn't make offensive comments about trans people. What she did was add an offensive "beep/bop/boop" to her Twitter profile after she was pressured by followers to add "she/her" and then removed it and addressed her misunderstanding after her costar told her
why other people have been adding pronouns to their own profiles. It was a tasteless joke seemingly born out of ignorance, not hate. Somehow, though, like a game of "Telephone," that's turned into "multiple hateful comments about trans people." It's just not true, yet the case against her largely rests on that.
People seem so eager to negatively interpret and misrepresent what she's said and done because they disagree with her opinions. She's not entirely innocent, but neither is Pedro Pascal, who has his own history of social media behavior that could be considered "problematic" if Disney and the folks going after Carano didn't happen to largely share his opinions. Again, Disney has the right to decide what doesn't represent them and to sever ties, but the excuses being made for that are being exaggerated, if not fabricated. Carano doesn't get much sympathy, even from me, since she made her bed, but we do need to be fair to her.