Derivative of a rotated vector with respect to the quaternion
I may have an answer, taking the derivation straight from "A Primer on the Differential Calculus of 3D Orientations" by Bloesch et al. (Appendix I: Section 3: Derivative of a Coordinate Map)
First, let $\Phi_{BA} \in SO(3)$ be a relative orientation of a coordinate system $B$ w.r.t. a coordinate system $A$. In the paper, they defined a mapping $\boldsymbol{C}: SO(3) \rightarrow \mathbb{R}^{3 \times 3}$ such that $\Phi(\mathbf{r}) \triangleq \boldsymbol{C}(\Phi) \mathbf{r}$ which means $\Phi$ can be a quaternion or euler angle (if I'm not mistaken). $\boldsymbol{e}_{i} \in \mathbb{R}^{3}$ be the standard basis vectors in $\mathbb{R}^{3}$, $\epsilon$ be a small scalar pertubation, and finally,
$$ \begin{align} \boxplus : SO(3) \times \mathbb{R}^{3} \rightarrow SO(3), \\ \Phi, \boldsymbol{\varphi} \mapsto \exp(\boldsymbol{\varphi}) \circ \Phi \end{align} $$
be the box-plus operator that forms the addition operator between $SO(3)$ and $\mathbb{R}^{3}$
Copying from the appendix to here, the map of an orientation applied to a coordinate tuple can be differentiated w.r.t. the orientation itself.
$$ \begin{align} \begin{bmatrix} \dfrac{\partial}{\partial \Phi} \Phi(\boldsymbol{r}) \end{bmatrix}_{i} &= \lim_{\epsilon \rightarrow 0} \dfrac{ (\Phi \boxplus \boldsymbol{e}_{i} \epsilon)(\boldsymbol{r}) - \Phi } { \epsilon } \\ &= \lim_{\epsilon \rightarrow 0} \dfrac{ \boldsymbol{C}(\boldsymbol{e}_{i} \epsilon) \boldsymbol{C}(\Phi)(\boldsymbol{r}) - \boldsymbol{C}(\Phi)(\boldsymbol{r}) } { \epsilon } \\ &= \lim_{\epsilon \rightarrow 0} \dfrac{ (\boldsymbol{I} + \boldsymbol{e}_{i}^{\times} \epsilon) \boldsymbol{C}(\Phi)(\boldsymbol{r}) - \boldsymbol{C}(\Phi)(\boldsymbol{r}) } { \epsilon } \\ &= \lim_{\epsilon \rightarrow 0} \dfrac{ \boldsymbol{e}_{i}^{\times} \epsilon \boldsymbol{C}(\Phi)(\boldsymbol{r}) } { \epsilon } \\ \dfrac{\partial}{\partial \Phi} \Phi(\boldsymbol{r}) &= -(\boldsymbol{C}(\Phi) \boldsymbol{r})^{\times} \end{align} $$
Highly encouraged to look at the paper to see the identities used for this derivation.
Please let me know if I got this wrong, I'm very new to differential geometry.