وَمَنْ دَخَلَ فِي صَلَاةِ النَّفْلِ ثُمَّ أَفْسَدَهَا قَضَاهَا،
Translation: Whoever begins a nafl prayer and then invalidates it must make it up.
Before it is begun, nafl is optional; after its opening takbir, a legal duty to complete the commenced act arises. Thus its invalidation entails makeup in Hanafi law.
وَلَا تُبْطِلُوا أَعْمَالَكُمْ
Translation: Do not nullify your deeds.
Hanafi reasoning also draws upon preserving an act of worship once undertaken.