Full Idea
In the Grundlagen of 1884 Frege was an anti-realist, but in Grundgesetze of 1893 he is a realist, who has profited by his interim discovery of the sense/reference distinction.
Gist of Idea
Frege started as anti-realist, but the sense/reference distinction led him to realism
Source
report of Gottlob Frege (On Sense and Reference [1892]) by José A. Benardete - Logic and Ontology
Book Reference
'A Companion of Philosophical Logic', ed/tr. Jacquette,Dale [Blackwell 2002], p.357
A Reaction
This is the germ of the new realist philosophy which seems to be growing out of Kripke and co's causal theory of reference. The very notion of reference is realist (hence Russell's realism).