From Wikipedia:
The Panama Canal Zone (Spanish: Zona del Canal de Panamá) was an unorganized territory of the United States from 1903 to 1979, centered on the Panama Canal in the Republic of Panama.
I don't know what SCOTUS ruled. but administrations and the military acted as if they were not on US territory. During WW-II all mail between US and Europe went through Bermuda where "censors" read it in violation of the 4th Amendment of the Constitution.