Scarlett Johansson has dropped out of Rub & Tug, amid controversy over her casting as a transgender man in the film. “I understand why many feel Dante ‘Tex’ Gill should be portrayed by a transgender person,” Johansson said Friday, in a statement to Out.

Johansson had been set to reteam with her Ghost in the Shell director, Rupert Sanders, on the film about Gill, a trans man who operated a massage parlor and prostitution business in Pittsburgh in the 1970s and 80s. The casting drew vocal opposition from some transgender actors, who said their stories are too often told by cis actors. “I wouldn’t be as upset if I was getting in the same rooms as Jennifer Lawrence and Scarlett for cis roles, but we know that’s not the case,” tweeted Transparent actress Trace Lysette. “A mess.”

Johansson’s initial response to that critique was strangely dismissive: “Tell them that they can be directed to Jeffrey Tambor, Jared Leto, and Felicity Huffman’s reps for comment,” she said, through a representative, to Bustle, citing three cisgender actors who had won awards for their performances as trans characters.

“I’ve learned a lot from the community since making my first statement about my casting and realize it was insensitive,” Johansson said in her statement to Out. “I am thankful that this casting debate, albeit controversial, has sparked a larger conversation about diversity and representation in film.”

This wasn’t the first time Johansson found herself the subject of a conversation about cultural appropriation in casting—on Ghost in the Shell, an adaptation of a Japanese manga, she played a character who had been Asian in the original source material. Hollywood’s long practice of whitewashing in casting—and its related tradition of casting actors from overly represented backgrounds as underrepresented characters—has become increasingly controversial, and actors including Matt Damon, Emma Stone, and Tilda Swinton have found themselves facing a backlash over playing such roles.