Nope. That's not the rule.
It is a foul for intentional grounding if a passer, facing an imminent loss of yardage because of pressure from the defense, throws a forward pass without a realistic chance of completion. realistic chance of completion is defined as a pass that lands in the direction and the vicinity of an originally eligible receiver
I didn't see the play but throwing the ball over players way out of bounds happens frequently. If that's what happened it was a terrible call. 2 things that are almost never called for intentional grounding are sailing the ball over a receiver out of bounds and throwing through of the back o f the endzone.
I don't believe the pass was intended to go to any receiver though. It seemed pretty clear htat he was just trying to get rid of the ball to avoid a sack. I believe that throwing it out of the endzone takes that out of hte equation though.