If you know that the sword can't hurt people that aren't evil, then stabbing randoms is by definition not evil because you can't hurt them.
I mean, yeah it's meta gaming hard and lots of folks wouldn't want this at their table, so chalk it up as a learning moment as a DM and figure out a good way to take it from them. The obvious one in this case is that the sword damages evil creatures, not destroys. Have our little meta-gaming pally stab a guy twice his level and get wrecked so he rethinks the practice. "Welp you've stabbed the bbeg, they've stripped you and the party of their possessions and locked you in a dungeon, boy you're lucky he had somewhere to be or you'd be dead." Like this is only a clever meta-game if you're in a video game where you know the level of the zone you're in and you know the full meta.
And even then, a simple "hey we're a RP table and we try to keep meta to a minimum, so please reconsider this practice" or "hey before you go stabbing everyone, do you know what the level of each of the characters are? something to think about..." is the polite thing to do before you ruin their game based on the DM's mistake.