The definition begins with “a noun.” Therefore, a similar-looking ending alone does not make every word ism manqus.
الْقَاضِي is a noun ending in ya after kasrah, so it is ism manqus.
فِي also contains kasrah before final ya, but it is a preposition, not a noun. Therefore it is not ism manqus.
Limitation: first establish that the word is a noun; then inspect its ending.