The US can be very creative about when its jurisdiction applies ( https://www.congress.gov/crs-product/94-166 ).
Manuel Noriega and “el Chapo” Guzman were both convicted of crimes they committed outside the US but that caused other people to commit crimes inside the US.
Traveling to countries for child sex abuse is illegal and severely punished, although it appears that the law is about the traveling with intent, and not (officially) about the actions that take place overseas: https://www.justice.gov/criminal/criminal-ceos/extraterritor... .