Yes, but why is it ilegal?
I mean, I see the topic's name is IG and the EZ but it was ruled ilegal forward pass, right?
Intentional grounding is distinct from other types of illegal passes, not only in the specifics of the act itself, but in penalty. Intentional grounding carries the penalty of loss of down at the spot of the pass (with no additional yardage penalty). Other types of illegal passes all carry a 5-yard penalty from the spot of the pass plus loss of down. Additionally, for an illegal pass to conserve time, the game clock starts on the referee's signal (if being put in play by snap). In all others, the clock starts on the snap (if there is one).
Note that an illegal pass that might be intentional grounding in the first period, might become an illegal pass to conserve time at the end of the second or fourth periods. Different penalties, different signals and announcements.
Finally, note that when an illegal pass is thrown from the end zone
and is incomplete, Team B has the option of declining the resulting safety, and taking an artificial result of the play - next down at the previous spot. If the previous down was 4th down, team B gets the ball. If Team A needs a touchdown to win, they might even take this option on 3rd down, to force a punt or other 4th down play, in hopes of a turnover deep in A's territory.