This seems very easy: when browsing the AppStore in Thailand, apps that insult the Thai king should be prohibited. Same with Facebook posts when accessed from Thailand, or YouTube videos etc. When accessing the same from the US, they MUST NOT be prohibited, because it would infringe on the rights of the creators.
Every nation should have the right to impose whatever restrictions it sees fit on companies wanting to distribute content to that nation.
Is it a pain to do this for the content distributor? Of course! But national sovereignty is far too important to be traded for ease of content distribution.
Of course, there is a problem (which some may consider a benefit) with the design of the Internet itself: there is no easy way to define what it means to distribute content to a particular country. But probably using national IP blocks is going to generally be good enough for many use cases.