As far as I know, this rule applied very regularly. But I'm not sure whether there are any specific words known to have been an exception to this rule.
By "specific words", I mean that I'm thinking of a word where it would have been generally agreed by educated speakers of Classical Latin that a short vowel was correct: not just a word where we have evidence that the regular long-vowel pronunciation was usual at some point, but a short-vowel pronunciation also existed because of the support of analogy. (E.g. in words prefixed with in-, we have evidence from Romance of pronunciations with ǐn- before S or F, as in French enfant from Latin infans, but the classical pronunciation of the Latin word is still thought to have a long vowel in the first syllable. I'm not looking for examples like that.)
Contexts where I'm less sure that the rule applied
One situation where I'm a bit uncertain is loans from Greek. I haven't found any Greek word containing a short vowel followed by ns that became a firmly established Latin word during the classical period, but I did find the word metensomatosis (from μετενσωμάτωσις) which apparently was used in Ecclesiastical Latin, and I wondered whether we can say anything about whether a Classical Latin speaker would have used a short vowel before the ns in this word.
Perfect and past participle forms with "ns"
Another situation where I'm not entirely sure is perfect forms and past participles containing ns. My understanding is that there are fewer sources that mention vowel length before ns in this context compared to other contexts. Allen's Vox Latina cites a passage from Cicero that talks about lengthening in prefixed words that start with ins, inf, cons, conf, and a passage from Probus that talks about words ending in -ns, but mentions only "sporadic references to the length of the vowel before ns and nf in other contexts" (p. 66).
I have always thought that participles like mansus and perfects like mansi must have contained long vowels before the ns in accordance with the lengthening rule, but it seems like some sources suggest a short vowel might be possible in this kind of context. For example, Bennett mentions a source that indicates a short vowel, although he treats it as unreliable: "Priscian lends the weight of his authority to such forms as trăxī, mănsī, dŭxī, which certainly had a long vowel in the best period" (p. 62).
I believe that most linguists share Bennett's disregard for Priscian's description of a short vowel in this context, but I'm not entirely sure.
This last question is a little different, but it's related enough that I think it makes sense to include it in this post. I think that the rule of vowel lengthening before ns or nf never applied across word boundaries to lengthen a vowel in the last syllable of a word ending in N, but I'm not completely sure. My understanding is that words like pecten, crimen and in are thought to have ended in a consonant [n] (unlike words ending in -m, which are thought to have ended in nasalized vowels except for when they were followed by a closely connected word starting with a plosive or nasal) and that while this [n] might have become assimilated across word boundaries to the place of a following consonant, it isn't thought to have been lost or vocalized before a word starting with S or F.