We consider the following panel regression model
\begin{align} Y_{i} = X_{1,i}\beta_1 + X_{2,i}\beta_2 + \epsilon_{i} , \ i=1,...,N, \end{align} where $Y_i := [y_{i1},...,y_{iT}]'$, $X_{k,i}:= [x_{k,i1},...,x_{k,iT}]'$ is a $T \times p_k$ matrix for $k=1,2$, $\epsilon_{i}$ is the $T \times 1$ idiosyncratic error.
It is known that the OLS estimate of the above model is given by \begin{align*} \begin{bmatrix} \widehat{\beta}_1\\ \widehat{\beta}_2 \end{bmatrix} = (\sum_{i=1}^{N}X_i'X_i)^{-1}\sum_{i=1}^{N}X_i'Y_i, \end{align*} where $X_i:= [X_{1,i},X_{2,i}]$.
My question is the following: whether the OLS estimate $\widehat{\beta}_1$ in the above expression is the same as \begin{align*} \widetilde{\beta}_1= (\sum_{i=1}^{N}X_{1,i}'M_{2,i}X_{1,i})^{-1}\sum_{i=1}^{N}X_{1,i}'M_{2,i}Y_i, \end{align*} where $M_{2,i} := I_T - X_{2,i}(X_{2,i}'X_{2,i})^{-1}X_{2,i}'$.
I thought $\widetilde{\beta}_1$ is an extension of the Frisch–Waugh–Lovell theorem to the panel data, but I couldn't find the relevant reference. I would appreciate it if you can share with me your thoughts on this issue, or let me know any related paper/theory/lemma that you might know.