Suppose I have a regression of the form: $$ Y_{it}=\beta X_{it}+\beta_{2}X_{it}\times D_{i}+\alpha_{i}+\epsilon_{it} $$ In the above, we have information by country-year on $Y_{it}$ and two regressors: $X_{it}$ and $D_{i}$. $X_{it}$ is time varying, but $D_{i}$ is fixed for each country over time. $\alpha_{i}$ measures the country fixed effect.
My question is: can $\beta_{2}$ be identified? As a fixed effects procedure uses only within-country variation, and as $D_{i}$ does not vary over time, how is $\beta_{2}$ separately identified from $\beta?$ I ran the regression and did find that it was identified. Am I missing something?