Exactly.
Shakespeare was the Goebbels of his time.
Shakespeare took no more liberty with the truth than our "entertainment media", really, and there was no gain in ticking off the powers that were--but much could be lost, including one's head.
We do not know the particulars surrounding the Play, but I'd wager the accuracy is about on the level of an Italian Indian riding up and saying "How!" in an American Western flick, and of little more significance.
Aside from using plots based in the foibles of human nature, that his plays have been preserved for so long may be an unintended consequence of pleasing the people in power. Note, too, that Bowdler subjected the plays to some severe editing. Apparently no one is immune to PC revision.