The truth is that based on the textual evidence we currently have, we can’t reliably claim to know Mary’s actual intention in that scene. She had three possible intentions, and all of them are potentially in line with what we see in the episode.
1: She MAY have intended to kill Sherlock. This would be supported by her look of surprise when John tells her Sherlock woke up, thus implying that she expected (and, given her aim and expertise, presumably then WANTED) him to die. (Sherlock’s claim of ‘surgical shots’ is not necessarily evidence to the contrary, because he has possible motives for lying to John about that.)
2: She MAY have intended for Sherlock to survive. This would be supported by her calling the ambulance immediately after shooting Sherlock, by her NOT taking a shot that could have killed him even more rapidly and certainly, and also by her coming to Sherlock later and asking him not to tell John the truth. If she truly wanted Sherlock dead, she had another opportunity to do it in that moment.
3: She MAY have been undecided on whether she wanted to kill him or not, and thus took a shot that would PROBABLY but not certainly kill him. This could account for all the evidence in both 1 and 2. In addition, it would explain why an assassin with aim that can put a bullet through a flipping coin went for an extremely dangerous but not immediately fatal shot, and why Sherlock took so much caution with her when confronting her in the empty house and yet simultaneously put John’s life at risk by setting him in the shadows and leading Mary to believe he was Sherlock.
In addition, however, the text cannot be relied on for this, because where Sherlock was ACTUALLY shot would, in a real human body, be the liver, which would be a slow but almost certain kill. Also, ‘fighting back’ from the brink of death in a situation like that is a trope so saturated with Hollywood drama that when you see it paired with that extremely Hollywood handling of guns, it’s an excellent clue that real-world logic has been thrown out the window in favor of playing to the viewers’ emotions.
In short, unless we’re presented with further evidence next season, the logical conclusion is that the writers were flying by the seat of their pants on that scene and didn’t actually care all that much about establishing solid characterization, so long as it lined them all up for the ensuing sequence of scenes.
Further, it means that unless we’re presented with further evidence next season, we are free to reason through our own headcanon for what was going on in Mary’s head there.
As I said before, my personal favorite—because it makes the most sense out of all the evidence available and also because I like what it implies about all the characters—is that Mary was undecided.
I like the meta I read about this…regardless of whether she wanted him to die or not (and the hospital scene certainly indicates she was at least hoping it might happen), the point of a shot that was not immediately lethal was not because she cared in that moment whether he lived or died. She wasn’t concerned about him, she was concerned about John. If John found him dead, he would come after his killer (who would certainly be nearby). If John found Sherlock alive, he would be preoccupied with keeping him that way, giving Mary time to escape. The only thing she asked Sherlock before she shot him was whether or not John was with him. Shooting him was all about keeping her secret from John, not about killing or not killing Sherlock.