Didn't Stalin expel Tito from Cominform?
I think distance was a big factor. I don't think it's a coincidence that both Yugoslavia and Albania weren't under the Warsaw Pact and it was the farthest western expansion of Communist rule (excluding Latin America). However, the fact that Yugoslavia was free from the apparatuses that justified Soviet invasion certainly helped. Finally, the Communist party wasn't installed by the Soviet Union, it arose relatively independently. Obviously, the USSR supported the Partisan movement, the Soviet advance against Germany helped Partisans take back the country, etc. In addition, even countries that the Soviets "installed" a government often formed plurality or majority coalitions to initially take control and only then expelled non-Communist parties (Czechoslovakia more or less is an exception to this rule). But the Red Army never occupied Yugoslavia, which helped it maintain independent control and I don't think the Soviets ever were in a position to invade it.
Also, when looking at the quelling of the Prague Spring, the Brezhnev Doctrine was arguably only about maintaining control, not expanding it. So Yugoslavia wouldn't fit in at all there.