It's still Scarlet Johansons voice and acting. The same role with the same lines read by different actors would be very different. Imagine for example that they would have cast Tilda Swinton for Samantha. Even with the same script it would probably end up a very different character. Actors aren't interchangeable.
It's very clear that OpenAI was trying to make ChatGPT sound like Samantha from Her. Whether they used Scarlet Johansons voice to train, or excerpts from the movie, or had writers come up with typical responses that sound similar to Samantha are details, and it's up to the lawyers to figure out whether this is legal or not.
But the undisputable fact is that OpenAI took heavy inspiration from a movie, and did so without permission. You could argue that taking inspiration from a popular movie is fair game, but I'm not sure where the line is between "inspiration" and a blatant rip-off.