This is simply a variation of the "to do X" vs "doing X" that we covered in depth with various OG and GMATPrep examples here: gmat-pill-presents-vs-which-to-choose-a-secret-idiomatic-152791.html#p1224932
Try not to think of it strictly as RIGHT VS WRONG.
The way we like to think of it here at GMAT Pill
is what is PREFERRED by the GMAT folks.
1) FORBID X TO DO Y
2) FORBID X FROM DOING
IF you were to choose between these 2 options on the GMAT, then option #1 would be correct. This is the PREFERRED option on the GMAT.
However, note that we choose #1 not because #2 is grammatically wrong, but rather because #1 is considered to be the simpler, more concise version. Therefore #1 is correct because it is the PREFERRED version.
Again, this does NOT mean that #2 is WRONG. MGMAT guides
say "wrong" - but that's only wrong in the context of a situation in which you are choosing between the two options.
However, if you simply see "FORBID X FROM DOING" in a sentence - and you are NOT choosing between this and the other option---then "FORBID X FROM DOING" is not technically wrong. In fact, it's fine---just not the optimal preferred version on the GMAT.
So try not to think of things as right and wrong. Context is important. On the test, you want to choose #1. But if your boss writes you an email mentioning #2---don't be so confident about challenging him/her because technically #2 can work, too---as long as #1 is not an option.
Again, for more examples, please reference the article here: gmat-pill-presents-vs-which-to-choose-a-secret-idiomatic-152791.html#p1224932
... and more
What's Inside GMAT Pill?
Zeke Lee, GMAT Pill Study Method (Study Less. Score More.)
GMAT Pill Reviews | GMAT PILL Free Practice Test