Any changes to the templates should ideally be made after the ANKIHUB_END section at the end of the text. This tells AnkiHub to avoid overwriting your changes.
If possible, install the AnKing Note Types add-on and customize the template through it. Actually, just having the add-on installed will prevent AnkiHub from touching your template, though you need to be mindful of the possibility of the note types add-on also overwriting your changes after updates (the add-on prompts you when there are updates, so you have the choice to decline the update).