I have seen the question here and have gone through the answer, but I still don't fully understand why the approach below, based on no-arbitrage, yields a different answer.
To summarize:
At time $t_0$, I borrow $S_0$ cash and I immediately spend it to buy one unit of stock
Whilst holding the stock, dividends are continuously compounded at a constant rate $q$ and reinvested into the stock until time $t$, at which point in time I will stop reinvesting and just take the cash, the value of which would be $D_t$
A time $t$, I need to repay the loaned money $S_0$, which has accumulated a continuously compounded constant interest rate $r$, i.e. $S_0e^{rt}$. I will also receive the cash from the counterparty for the forward (i.e. $F(t_0,t)$, which is the forward price agreed upon at time $t_0$), and I will need to deliver the 1 unit of stock to the counterparty, which I have held the whole time until $t$.
These transactions are summarized in the table below:
Clearly for there to be no opportunity to make cash out of thin air, i.e. for the forward $F(t_0,t)$ to generate no arbitrage, we must trivially have at time $t$ that:
$$-S_0e^{rt}+F(t_0,t)+D_t=0$$
Now let's elaborate on the value of $D_t$, since it seems to have various formulas assigned in different answers on this page (apologies if this is over-laboring the point). First, assume that the dividend is discrete and paid at time $t$ at the forward maturity: clearly, the value of $D_t$ would be $qS_{t}$.
Now if we split the time domain into two equal parts, and assume that the dividend rate would be $\frac{q}{2}$ paid at the mid-point, re-invested into the stock and then another dividend at rate $\frac{q}{2}$ paid at maturity, we would get the following transactions (for notation simplicity, in the table below, $t_1$ is the midway point in time, with $t_{1_{-}}$ and $t_{1_{+}}$ being the infinitesimal points in time just before and just after $t_1$. The maturity is then denoted $t_2$. I assume that once the dividend gets paid, it gets immediately reinvested):
Clearly, if we keep splitting the time domain into increasingly larger number of $n$ parts and take the limit $n\to\infty$, the formula in the table converges to $S_te^{q}$, (since $\lim_{n\to\infty}\left(1+\frac{q}{n}\right)^n=e^q$.) We assumed that the time domain was 1 unit of time.
Generalizing, clearly the value of the continuously compounded and simultaneously reinvested dividends, INCLUDING the value of the 1-unit of stock that has been held the whole time, would be $S_te^{qt}$.
At maturity, value of the left-over dividends would then be: $$D_t=S_te^{qt}-S_t=S_t(e^{qt}-1)$$
Going back to the no-arbitrage equation, since $D_t$ is stochastic, we need to take an expectation (as rightfully pointed out in the comments):
$$-S_0e^{rt}+F(t_0,t)+\mathbb{E}^Q_{t_0}[D_t]=0$$
i.e.
$$F(t_0,t)=S_0e^{rt}-\mathbb{E}^Q_{t_0}[D_t]=\\=S_0e^{rt}-\mathbb{E}^Q_{t_0}[S_t(e^{qt}-1)]=\\=S_0e^{rt}(2-e^{qt})$$
This answer is obviously different to the one given in the linked question, and also different to the answer below. If possible, please point out where the difference might be coming from?
EDIT: As per Kurt's comment, the solution is trivial. Instead of borrowing $S_0$ money at $t_0$ abnd buying a whole 1 unit of stock, it's enough to borrow just $S_0e^{-qt}$ to buy $e^{-qt}$ units of stock, and use the dividends to grow this to 1 unit at maturity, as per the table below:
Trivially, at maturity, we get:
$$F(t_0,t)=S_0e^{rt-qt}$$