I am not sure if it was a movie or a series. I think it was a series and I think it is not that old.
There is a female cop or something similar (FBI, …), she is a side character and possibly does not appear at the beginning. She has red hair, shoulder long or a bit longer, possibly curly.
There is a scene where she gets home after a long stressful day. She lays on her bed and starts to chat with her laptop. I think she chats with strangers. After some moments the chat evolves to cybersex. She starts to masturbate but stops short after because she is depressed. There was something traumatic in her past. She starts to sleep.
Later in a scene she comes to her apartment with a woman. The woman is somehow related to what she is investigating and she knows that she should not have a private relation to her. I cannot remember why they got there both. They did not plan to hook up in the first place but eventually do it. The woman sleeps there and steals something from the cops save the next morning. She already planned that from the beginning. She gets busted by the cop.
Sometime later she gets shot in the shoulder or somthing.
She discusses a few times with her boss in his office because he is not agreeing with her or with her methods.
If I remember correctly the actress looks similar to Laura Spencer