Mary, while I certainly think she loves John, is primarily concerned with what is best for Mary. She will do anything to keep John. Whether she has to lie about her entire life, kill Magnussen, or murder John’s best friend. Her love, and how she expresses it, is extremely selfish. It’s not about what is best for John. It’s about making sure he stays with her.
Sherlock, on the other hand, will murder someone at cost of his own life, protect the woman who shot him, and come back from the fucking dead to protect John and make him happy.
His feelings for John are not selfish our driven by ulterior motives. When he lies to John, it is to make sure John is safe. Not to make sure John didn’t leave him.