There are two important dimensions to keep in mind with the insert. The first is going to be the physical size of the insert and the second is going to be the viewable area.
For instance the technology that makes for the holographic fire effect that’s hidden in the top 10” in. This part is meant to be trimmed over so you don’t see it. The viewable area is 28” in wide by 22” in tall. The overall size is 28” in wide by 32” in tall and 12” in deep. Again the top 10” in is framed or trimmed over and not meant to be visible. Most fireplace openings will increase in height once you get past the initial lip.
For instance, combustion fireplaces vent through flue into the chimney and so there is more height once you get back a few inches. Since the top 10” in is not meant to be visible it may be possible to fit our insert into your opening.
Keep in mind that with real wood burning fireplaces the logs are often set back into the fireplace and not at the very front so that burning embers will go up into the chimney and not into your room.
Therefore, setting the fireplace back a couple inches looks perfectly normal just like a real combustion fireplace.