Thailand still has lese majeste law that’s very much active. There’ve been activists/people who served jail time because they spoke against the royal family. Since Thailand still has monarchy (along with “democracy”), a retelling which suggests that the former king was queer may be considered defamation to the royal family (since he’s their ancestor).
It wouldn’t change the outcome tho. This story is very well known in Thailand and is especially propagated by the right-wing nationalists. Even with name changes, people would still recognize the story since it follows the events in history quite accurately. But, for the author to make up the entire story, it would defeat the whole purpose and charm of the story. ( ̄∇ ̄")
“means that anybody in the world making retelling of Thai history can be seen as blasphemous”
To answer crudely, yes. Unfortunately, Thailand is extremely conservative about how its history is portrayed. Actually, the author took great effort in actually researching to include elements of the Myanmar's version of this event as well. In contrast to how it was portrayed before in other Thai media, this comic gives nuances and humanity to the story instead of the black&white propaganda. ( ദദ ˙ᗜ˙ )

I really enjoy the story and understand the BL implications but why do you say for legal reasons the author cannot use names and intimacy scenes? Is it forbidden. I really don't know about history of SEA sorry...