In general, you have fixed 3x3 mass moment of inertia tensor $\mathrm{I}_{\rm body}$ riding along the body coordinates and it needs to be rotated into the inertial directions to be used in the equations of motion. Give a 3x3 rotation matrix $R(t)$ this is done with $\mathrm{I}(t) = R\, \mathrm{I}_{\rm body} \,R^\top$
So the mass moment of inertia is changing with time due to rotation in the general rotational equation of motion summed at the center of mass and along the inertial reference directions:
$$\begin{array}{r|l}
\text{momentum} & \overline{L} = \mathrm{I}\,\overline{\omega}= ( R \mathrm{I}_{\rm body} R^\top) \overline{\omega} \\
\text{torque} & \overline{\tau} = \tfrac{\rm d}{{\rm d}t} \overline{L} = \mathrm{I}\, \dot{ \overline{\omega}} + \overline{\omega} \times \overline{L} \end{array} $$
Notice that $\tfrac{\rm d}{{\rm d}t} R = \overline{\omega} \times R$
But now you want to consider a situation where the mass of the body changes, or the configuration changes, and thus $\mathrm{I}_{\rm body}(t)$, or $\dot{\rm I}_{\rm body} \neq 0$.
This changes the rate of change of momentum as follows
$$ \begin{aligned} \overline{\tau} & = \tfrac{\rm d}{{\rm d}t}\overline{L} = \mathrm{I}\, \dot{\overline{\omega}} + \left( \tfrac{\rm d}{{\rm d}t} ( R \mathrm{I}_{\rm body} R^\top ) \right)\overline{\omega} \\
& = \mathrm{I}\, \dot{ \overline{\omega}} + \overline{\omega} \times \overline{L} + \underbrace{ ( R \dot{\mathrm{I}}_{\rm body} R^\top ) \overline{\omega}}_\text{extra term}
\end{aligned}$$