Do I have to reset the run entirely and get the character's ending or can timer end on the defeat?
You can lose, or even continue as many times as you wish throughout the run. The only penalty is the amount of time it takes in doing so. Obviously a good run will be 1CC with no round losses, but if your current best run has a round loss or a continue, it is still valid and will still be verified.
I should clarify what I mean by a loss. For most characters, the final fight is against M. Bison and as you may already be aware if you lose against him you get M. Bison's ending instead of your own character's.
What you do not get to do is continue on that fight. It just jumps straight to Bison's ending.
So how would that be resolved? The rules state that timing ends on the final hit against the final boss of your character's campaign so if they defeat you instead does that mean I have to start a new run entirely to get my character's ending and therefore a run on the board?
Oooh Right. Sorry I completely forgot about that.
In that case unfortunately it does not classify as having completed the run as the bad ending is seen as a game over, rather than a completion. My apologies, I completely forgot about it, and yes it means you would need to restart and try again.