Why was Trump allowed to leave the country?

Trump recently visited his golf course in Scotland. He likes Scotland because it's a socialist country. But it begs two questions, why is the UK allowing someone that's under arrest for criminal activities enter and why is America allowing him to leave? I doubt ordinary Americans are allowed to pop overseas during their court trial.

Should he be locked up as a flight risk? Is he really in Scotland to take advantage of their new gender assignment laws?

Thoughts
Why was Trump allowed to leave the country?
Post Opinion