In World War II, Japan and the European Axis powers had to communicate over strategy and other things. Also, their diplomats must have had to go to their own countries sometimes. After the USSR entered the war, how was this done? Was this not a major problem for the Axis Powers?
Diplomats enjoy certain immunities. When accredited as such, they can travel in "enemy territory" without interference (unless declared persona non grata), and only the least "civilized" countries will violate the sanctity and privacy of diplomatic pouches.
It was much easier for Japanese diplomats to travel through the Soviet Union than for German diplomats, because technically, the Soviet Union and Japan were at peace, even though their respective allies were at war with the other. Hence, most of the communication between the Axis powers in World War II was done through Japanese diplomats based in Europe.