Sauron knows that Gandalf has different values than Sauron,
Sauron is probably a cynic. He probably thinks that “Every Gandalf is really a Sauron.” That is, every do-gooder who seems to be guided only by virtuous principles is really a self-aggrandizing power-grabber trying to mask their power-grabbing behind a veil of pious slave-morality (as Nietzsche might put it). So (Sauron must figure), claiming the ring would actually be the best way for Gandalf to realize his own actual ends. But (Sauron must conclude) Gandalf must just be too stupid, or blinded by convention, or self-deluded, or something, to realize this.
Sauron is probably a cynic. He probably thinks that “Every Gandalf is really a Sauron.” That is, every do-gooder who seems to be guided only by virtuous principles is really a self-aggrandizing power-grabber trying to mask their power-grabbing behind a veil of pious slave-morality (as Nietzsche might put it). So (Sauron must figure), claiming the ring would actually be the best way for Gandalf to realize his own actual ends. But (Sauron must conclude) Gandalf must just be too stupid, or blinded by convention, or self-deluded, or something, to realize this.