Scarlett Johansson appears to be backtracking on her feelings about withdrawing from a movie where she was playing a trans person ... now saying she outta be able to play whoever the hell she wants.

ScarJo opened up about politically correct casting to As If magazine (without directly mentioning her now-debunked role in "Rub and Tug"), saying ... "You know, as an actor I should be allowed to play any person, or any tree, or any animal because that is my job and the requirements of my job."

She added, "I feel like it’s a trend in my business and it needs to happen for various social reasons, yet there are times it does get uncomfortable when it affects the art because I feel art should be free of restrictions," going on to say ... "I think society would be more connected if we just allowed others to have their own feelings and not expect everyone to feel the way we do."

Her thoughts on the issue are catching fire on social media (in a bad way) -- folks are tearing her apart for apparently believing she was perfect for the "Rub and Tug" role, with some folks calling her privileged and tone-deaf.

Interestingly enough, Scarlett's been involved in other casting controversies as well -- including in 2017 when she starred in "Ghost in the Shell," which was originally written with an Asian protagonist when it debuted as a Japanese manga series.

When she was called out for getting involved in that production, she apologized and said and she never wanted to feel like she was playing a character that was offensive to others.

Fast-forward to 2018, when she pulled out of "Rub and Tug" and issued a mea culpa of sorts, implying she'd learned a lot from the trans community about the importance of casting trans actors in trans roles ... contradicting what her rep said earlier about non-trans actors playing trans people to critical acclaim.