Test for structural break with panel data

I want to study a variable $$Y_{it}$$ that represents the profit of several firms over time. In particular I want to evaluate whether there is a structural break after a specific year. the idea is to run a model where I introduce time dummies for each year from the year of the break onwards:

$$Y_{it}=\alpha + \beta_1Year_{break} + \beta_1Year_{break+1} + ... + \epsilon_{it}$$

However, I want to account for possible unobservable heterogeneity across firms given that I have panel data.

• If I demean $$Y_{it}$$ first and then run the model above, am I capturing the unobserved heterogeneity?
• Aso, would it be similar to simply add firm-fixed effects in the model above? (The results differ when I run the model with a demeaned dependent variable vs. the one with firm fixed-effects and I would like to understand why)