Queen as a character

It’s the first Wednesday of the month again, time for a post for the Insecure Writer’s Support Group. And I’m one of the hosts this month, together with Erika Beebe, Sandra Cox, Sarah Foster, and Chemist Ken. Hooray!
~~~~~~~~~~~~~~~~~~~~
I’ll forgo this month optional question for a question (or five) of my own. I recently read a fascinating novel, a cozy murder mystery The Windsor Knot by S.J. Bennett. I enjoyed it, but it also inspired a few of those questions I want to ask.
You see, one of the novel’s protagonists is Queen Elizabeth – the current ruler of Britain and one of the sleuths of the story. There are also other characters representing the living people in the queen’s entourage, all with their real names. Plus, of course, some fictional characters. I wonder if the author had to ask permission to use the real persons’ names and the queen’s personality in her book. And what does it say about the British law that the permission was (obviously) granted? Maybe Bennett didn’t even have to ask. Maybe any writer could use the British royals as characters in their fictional tales. I know there are several books like that. How much difference is there between the real Queen Elizabeth and her fictional counterpart?
And the inevitable second series of questions arises. I’m a Canadian. What if I wanted to create a fictional version of our political leader, the Prime Minister Justin Trudeau? Would I have to ask permission? Would it be granted? Or is it permissible without asking?
Could an American writer use their current president as a fictional character? How about a Hollywood star or a television host? Is any public persona a fair game for fiction writers? Does anyone know the answers to my questions? If not, would you care to speculate?