I have a panel dataset. My statistical model includes an exogenous variable X_1, an endogenous variable X_2 (instrumented by Z) and two-way fixed effects. My goal is to estimate the model in two non-overlapping time periods and test whether coefficient for the instrumented term (X_2) is different.

reghdfe y X_1 (X_2 = Z) if time==1, absorb(FE1 FE2) vce(cluster G)
reghdfe y X_1 (X_2 = Z) if time==2, absorb(FE1 FE2) vce(cluster G)

Methods using suest and gmm are discussed in other threads, but I don't see a direct application to my setting.
Any help is appreciated!