The other answer here is good already and answers the question but I've found another source that has some more insight into the scene which is helpful here. The interview reiterates the quote from Sher in Jenayah's answer and then has the following from Todd Phillips himself (emphasis mine):
IndieWire recently asked Phillips about Sophie’s fate during a video interview with Anne Thompson, to which the director doubled down on the answer that Sophie is alive at the end of “Joker.”
“He doesn’t kill her, definitively,” Phillips said. “As the filmmaker and the writer I am saying he doesn’t kill her. We like the idea that it’s almost like a litmus test for the audience to say, ‘how crazy is he?’ Most people that I’ve spoken to think he didn’t kill her because they understand the idea that he only kills people that did him wrong. She had nothing to do with it. Most people understood that, even as a villain, he was living by a certain code. Of course he didn’t kill this woman down the hall.”
The apartment scene is the last time Zazie Beetz is seen in “Joker,” but Phillips revealed there was an additional beat planned for the film that would have not left Sophie’s fate up for debate. The director said the script included a cutaway moment during Arthur’s interview with Murray Franklin (Robert De Niro) that showed Sophie watching the discussion on television. The shot would have confirmed outright that Arthur did not kill Sophie. Phillips cut the moment because he only wanted the movie to be told from Arthur’s point of view, and cutting to Sophie would have disrupted the film’s narrative structure.
Indie Wire, Todd Phillips Cut Zazie Beetz ‘Joker’ Scene That Confirmed Her Fate — Exclusive Video
That deleted scene actually appears in the leaked script, as its leaked though take it with a pinch of salt for if its correct or not.
INT. SOPHIE'S APARTMENT, LIVING 116 ROOM - CONTINUOUS
Sophie's sitting on her couch watching this interview play out on TV. GiGi's asleep next to her. The open envelope and the money are lying on the coffee table. No sign of the flowers anywhere.
MURRAY FRANKLIN (ON TV) Let me get this straight, you think killing those young men is funny?
JOKER (ON TV) Yeah. But comedy is subjective, isn't that what they say? Besides, the way I see it, what happened was a good thing. All of you, Gotham, the system that knows so much, you decide, you decide what's right and wrong. What's real or what's made
up. The same way you decide what's funny or not.
Sophie edges forward on the couch, can almost see a hint of agreement on her face.
INT. SOPHIE'S APARTMENT, LIVING 120 ROOM - CONTINUOUS
Sophie screams and jumps to her feet horrified! Waking up GiGi who starts to cry when she sees what's on television--
Joker - Leaked script