There are two competing principles in international law.
- Nations have a right of self-determination.
- Nations have a right of territorial integrity.
The obvious problem comes up when part of a nation declares itself a nation and wants to secede. If they are a People with a capital P within a multi-nation state, then self-determination may win. If they are just a faction or a province within a state, then territorial integrity may win. How it comes out depends on the political climate at the time, and of course also on the self-interest of various political actors.
- Croatia and Slovenia were Socialist Republics within Yugoslavia.
- One could argue that Croatia and Slovenia had a stronger national tradition than Kosovo. At least it was perceived that way in the West, and the Warsaw Pact was disintegrating.
The timing allowed Croatian and Slovenian public relations teams to put their quest for independence into the same narrative as the breakup of the Warsaw Pact, which was viewed in the West as a liberation of oppressed Peoples from the Communist yoke. (Viewers in Russia have a different view, of course.)
By contrast, Kosovo was an autonomous province within the Socialist Republic of Serbia.
- By the time it fought for independence, the West was fed up with fighting in the Balkans and Russia was asserting a role on the global stage, including support for Serbia.
- And as user24240 put it bluntly in his answer, it was possible to paint the KLA as a terrorist group. The label terrorist is becoming almost as arbitrary as democrat was during the Cold War, but it cost them support.
Some people in the West really didn't like that the KLA forced their hand and got them into a war with Serbia. That reduced goodwill towards the Kosovo. I think the effects are still lingering.