Section o8.7 part of The Reliance of the Traveller (a Shafi'i fiqh book) contains a description of the relevant action that makes someone a disbeliever:
(11) to say that a Muslim is an unbeliever (kafir) (dis: w47) in words that are uninterpretable as merely meaning he is an ingrate towards Allah for divinely given blessings (n: in Arabic, also "kafir");
The Reliance of the Traveller, p. 596-597
The stipulated exception implies that asserting someone is behaving ungratefully towards Allah (which appears to be the case in the question) does not amount to kufr.
Nevertheless, while it's hard to avoid sometimes, the Prophet's advice is: do not get angry (Jami` at-Tirmidhi 2020 [grade: sahih]).