Ignoring that people absolutely were and are critical of McCoy’s “banter”… the two relationships are inside an entirely different context.
McCoy and Spock are extremely close friends, who hold deep respect for one another, and Spock certainly gave it back just as well.
McCoy never, however, not once questioned whether Spock was a person. Nor did he go around talking about how Spock was just an object and lacked the ability to do more than regurgitate rote facts with other senior officers.
Never, ever, has McCoy called Spock “it” while questioning his basic competency to do simple tasks, and never has McCoy, when corrected by Kirk, offered backhanded apology saying something to the effect of “I’m sorry, I’m unaccustomed to working with Nonliving Devices” like how Pulaski did- as if Data were a new model tricorder.
The first episode with Pulaski, she tells Troi to pick someone else to be in the med bay for moral support because, according to her, Data couldn’t do that. Fortunately, Troi refused.
Neither did McCoy ever try to kill the entire ship’s company and get angry with Kirk when he said “no."
Nor did he do anything like how she went around repeatedly trapping Data into doing bullshit things to prove he was indeed a person, or whatever you want to call it. To prove something that cannot be proven. Not even by Pulaski about herself. Pulaski’s personhood is just assumed by society where every moment Data has to prove that he is. And she’s wielding that power imbalance like a club.
Even in her second to last episode (Peak performance,) she’s setting Data up in these challenges and when she realizes she finally goes too far; her advice is to get back up there and do it again.
Outside of her relationship with data, which is the bulk of what we see on screen.
Ultimately, the problem is that Data is not Spock. Where Spock was able to respond to the barbed banter, Data was largely unable or unwilling. He just took it, and for me it rather feels like watching Pulaski kick a puppy,
Where McCoy and Spock were two equals, Pulaski kept him off the podium of personhood, where McCoy might have apologized in good faith, she treated him like a tricorder, and that literally in an emergency. Where McCoy was a main character with background and more fleshed out, Pulaski was fairly one dimensional.
Where McCoy’s barbs served to illuminate Spock’s nature as a hyper-rational highly logical and unemotionall person, Pulaski served to highlight Data’s empathy, and kindness and loyalty.