A few visible deeds do not reveal someone's final state. Nor should an individual mistake lead us to declare a person permanently beyond reform or repentance.
إِنَّمَا الْأَعْمَالُ بِالْخَوَاتِيمِ stresses the connection between deeds and their endings. It does not say that earlier good deeds have no value; it encourages a good course of action that continues to its conclusion.
For example, if a friend seeks to leave a harmful habit, provide fair support for genuine reform while also working on your own consistency.