Given the asset price $S_t$ which is defined as follows $$\frac{dS_t}{S_t}= r_tdt+\sigma_tdW_t$$ where $r_t$ is not necessarily deterministic.
What is the strategy of replication of the portfolio with the payoff $\int_0^T \frac{dS_t}{S_t}$ ?
My attempt:
In fact, I can solve this problem only for the special case where $r_t$ is deterministic. For simplicity's sake, I provide the solution for an easier case where $r_t =r$ constant.
Let's $V_t$ the replicating porfolio of $\int_0^T \frac{dS_t}{S_t}$, we have \begin{align} V_t &=e^{-r(T-t)}E^{\Bbb Q}[\int_0^T \frac{dS_u}{S_u}|\mathcal{F}_t] \\ &=e^{-r(T-t)}\int_0^t \frac{dS_u}{S_u}+e^{-r(T-t)}E^{\Bbb Q}[\int_t^T (rdu+\sigma_udW_u)|\mathcal{F}_t] \tag{1}\\ &=e^{-r(T-t)}(\int_0^t \frac{dS_u}{S_u}+r(T-t)) \tag{2}\\ \end{align}
From (2), by applying the Ito's lemma, we obtain easily that \begin{align} dV_t &= re^{-r(T-t)}(\int_0^t \frac{dS_u}{S_u}+r(T-t))dt +e^{-r(T-t)}(\frac{dS_t}{S_t}-rdt) \\ &= r(V_t-e^{-r(T-t)})dt+e^{-r(T-t)} \frac{dS_t}{S_t} \tag{3}\\ \end{align}
From (3), we obseve that we can replicate $V_t$ (which is equal to $\frac{e^{-r(T-t)}}{S_t}S_t+ \frac{V_t-e^{-r(T-t)}}{B_t}B_t$) by investing $e^{-r(T-t)}$ in the asset $S_t$ at time $t$ and the rest of the portfolio $(V_t-e^{-r(T-t)})$ in cash.
Problem:
For the general case where $r_t$ is stochastic, I don't know how to deduce (2) from (1), or (3) from (2).
I guess the strategy in the general case must be investing $P(t,T)$ in the asset $S_t$ ($P(t,T)$ is the zero-coupon bond price between $t$ and $T$) and the rest of the portfolio in cash. But I don't know how to prove that.
The zero-coupon bond $P(t,T)$ is specified by
$$\frac{dP(t,T)}{P(t,T)} = r_tdt + \gamma_t dB_t$$
For simplicity's sake, let's suppose the correlation between $B_t$ and $W_t$ be zero ($\left<dB_t,dW_t\right> = 0$)