Setup
Consider the (general) stochastic volatility model \begin{align} \mathrm{d}X_t &= \mu^X(X_t)\mathrm{d}t + \sigma^X(X_t)\mathrm{d}W^X_t \\ \mathrm{d}Y_t &= \mu^Y(X_t)\mathrm{d}t + \sigma^Y(X_t)\mathrm{d}W^Y_t \end{align} Where $W^X$ and $W^Y$ are correlated Brownian motions $\mathrm{d}\langle W^X,W^Y\rangle_t = \rho \mathrm{d}t$ for $-1 < \rho < 1$. We suppose all regularity conditions verified for the existence and unicity of strong solutions.
It is a rather simple exercise to show (see, e.g. https://ora.ox.ac.uk/objects/uuid:2d731904-102d-458b-86a4-a4d3c4dd20df, Example 2) that
\begin{align} Y_{t+1} - Y_t \mid \left[X(s), t \leq s \leq t+1\right] \sim \mathcal{N}\left(\int_{t}^{t+1} \mu^Y(X(u)) \mathrm{d}u + \rho \int_{t}^{t+1} \sigma^Y(X(u)) \mathrm{d}W^X_u, \int_{t}^{t+1} \sigma^Y(X(u))^2 \mathrm{d}u\right). \end{align}
Problem
I am interested in computing the derivative of the (log)-likelihood of $Y_{t+1} - Y_t$ with respect to the path $X(s)$, $t \leq s \leq t+1$, for which I need to be able to compute the derivative w.r.t. the mean and variance. The derivatives of the terms $\int_{t}^{t+1} \mu^Y(X(u)) \mathrm{d}u$ and $\int_{t}^{t+1} \sigma^Y(X(u))^2 \mathrm{d}u$ are easy thanks to the absence of the Brownian in the integral, but the term $\int_{t}^{t+1} \sigma^Y(X(u)) \mathrm{d}W^X_u$ is hard to differentiate given that $\mathrm{d}W^X$ is fully caracterised by $X$.
I have implemented the Euler-Maruyama discretised version of the system and "naively" computed the terms and their derivatives by noting that \begin{align} W^X_{t_{k+1}} - W^X_{t_{k}} \approx \sigma^X(X(t_k))^{-1}\left(X(t_{k+1}) - X(t_k) - \mu^X(X(t_k)) (t_{k+1} - t_{k})\right) \end{align} and the gradient of the Brownian driven term seems to diverge.
Question
Is there a way to compute this gradient (and implement it in a discretised model) or is the gradient fully undefined in this case due to some irregularity of the inverse mapping $X \to W^X$ that I have missed?
Thanks a lot.