Technically, you're dealing with two different phrases. Which one is correct depends on your usage of them, and in your two examples, both are equally correct.
When you insert a noun in between the two words ("all x but"), you are referring to a collection of x but noting that there are exceptions.
The "all but" idiom refers to the fact that the subject of the idiom is as close to being described by the adjective as it can be without being completely and accurately described by that adjective. Saying that the championship is "all but" decided is saying that, while it is not officially 'decided', it's so close to being decided that the distinction is hard to discern.
The key difference is that, if you replaced 'but' with 'except' in the first instance, it would still make sense:
Close all tabs except this one.
However, with the second instance, it is not considered a proper use:
The championship is all except decided.
The confusion exists because, sometimes, you can remove 'x' from the first use:
All but the oldest fruit was still edible.
How you can tell the difference here is that you can easily move the subject (fruit) between "all" and "but" and the sentence will still make sense:
All fruit but the oldest was still edible.
Also, as I mentioned before, either one of the last two examples makes sense when you replace "but" with "except", indicating that it is being used to imply the "all x but" descriptor.