Timers

As is often the case with Hubitat, there are many ways you could do this, but it's pretty simple using Basic Rule. Here's an example:

This will indeed restart the timer if the rule "re-triggers," i.e., when the fan turns on again.

I also wrote a custom app, Timed Switch Helper, that does the same thing with perhaps a couple fewer clicks (and a few more options), but that was before Basic Rule existed and when doing the same thing in even Rule Machine would have been a bit different, as you might guess from the screenshot. There are likely others, too.