2SLS with endogenous interaction terms Suppose I have a regression model:
$$y_{i}=x_{1i}\beta_{1}+x_{1i}D_{i}\beta_{2}+\epsilon
$$
 where $\mathbb{E}\left[\epsilon_{i}|x_{i}\right]\neq0$ , and there
is a problem of endogeneity. In the above, think of the dummy variable
being equal to $1$ when $i$ is male. As such, this model allows
for a differential effect of $x_{1i}$ on $y_{i}$, if the individual
is a male or female. In order to obtain consistent estimates, suppose
I have an instrument $z_{1i}$, which is both a relevant instrument
for $x_{1i}$, and satisfies the exclusion restriction (such that
$cov(z_{i},\epsilon_{i})=0).$ If there were no interaction term,
it would be trivial to estimate the above using Two stage least squares,
or simply just computing:
$$
\hat{\beta}=\left(\boldsymbol{z'}x\right)^{-1}\left(\boldsymbol{z'y}\right)
$$

However, the complication arises due to the interaction term. How
would I go about obtaining estimates for both $\beta_{1}$ and $\beta_{2}$?
One option is to construct another instrument $D_{i}Z_{1i}$. Would
such a procedure be valid?
Let $X$ be the original regressor matrix and $Z = [z \;\; zd]$ be the intstruments matrix, and consider the IV estimator

$$\hat \beta_{IV} = (Z'X)^{-1}Z'y = (Z'X)^{-1}Z'(X\beta + u) = \beta + (Z'X)^{-1}Z'u$$

As long as the things that are included in $Z$ are orthogonal to the error term, we get consistency... provided that $Z'X$ remains invertible, something that you can easily check in your case.