Hey — you did it in a correct way.
There’s no way to automatically clear all rows from a doc you’re trying to copy / turn into a template. And there’s a good reason — what if some rows are actually crucial to preserve? Not all rows are data, some are helper tables, e.g. here a single-row table is used to implement a makeshift multi-column dashboard view. The row must stay because it’s not set up with user data itself — it’s set up to aggregate and display the data.
What I usually do is create a button where I specifically program how I want to reset the doc. For some tables I just delete all rows, for other tables I delete all but some rows, and in some tables (usually singleton tables, i.e. single-row tables) I only modify certain columns: