The basic model for the ANCOVA is:
$$ E[Y_{t>t_0} | X, Y_{t_0}] = \alpha + \beta_1 Y_{t_0} + \beta_2 X$$
Where $t_0$ is the baseline and $Y$ is the time series of the response and $X$ is the indicator for receipt of intervention. The coefficient $\beta_2$ summarizes the average difference in change from baseline between treated and control. $\alpha$ is the expected change from baseline in the control group.
Of course, I've suppressed the actual expression of the error term, you can use any number of model based or robust estimates (GEE, mixed model, etc.) to handle repeated measures. The point is even if there's a time-varying trend in the post-baseline response, such as comes from a learning effect or growth effect, the hypothesis of a mean-difference-in-differences is still well motivated. In other words, rejecting the null, you can still state that participants in the intervention group on average have a greater or lesser change from baseline than those in control. This is supported both by theory (exact derivations can show hits to power but the test retains suitable power depending on the design) and by practice (guidance on estimands supports fitting the model that most closely parametrizes the quantity of interest based on initial hypotheses and settings).
However you can generalize the ANCOVA to fit any complex time-series for the mean change-from-baseline process in treated and control using splines, filters, or other. Splines would be preferable in my book because it would be quite simple to construct a hypothesis test using a likelihood ratio test. You could argue that the ANCOVA is a time series model using a "constant" for the change-from-baseline-process. This family of tests is often called "interrupted time series" but the expression of time is almost always no more complicated than a first order, i.e. linear effect. The consequent likelihood ratio test for the interaction slope and interaction intercept parameters are sensitive to detect a "jump" or "growth" effect.