I think his lawsuit drama was with McFarlane over ownership of the Angela character and the Miracleman rights. Gaiman won.
Apparently DC still owns all of Sandman's characters and trademarks and licensing and all that, but they have a special deal with Gaiman that they don't do anything without his input or blessing. And Gaiman is obviously paid more handsomely than just about any other creator.
My guess is sometime in the 90s they realized what a phenomenon they had on their hands and they might have actually learned from their mistakes with Alan Moore.
I'm pretty sure that going forward, all (most?) of the properties published by Vertigo were creator-owned. (Transmetropolitan, Preacher, Invisibles, Y: The Last Man) but Sandman remained DC's property because Vertigo didn't even exist when Gaiman started writing Sandman. A lot of the characters are even old DC characters, such as Cain and Able, Destiny, Hector and Hypolyta Hall, Dr. Destiny, etc.) The connections to the DC universe were phased out as Sandman became a big hit.
Anyway...TL;DR....DC Comics owns Sandman 100% but they try to be "cool" about it and Gaiman doesn't complain publicly.