Hello, I would like to know how Amabassadors and their staff evacuated after a declaration of war. They had to leave a now enemy territory to get back home, at a time where transportation was not as fast as today. For example, how Japanese ambassador did leave USA after the Pearl Harbor attack? And how his American counterpart in Tokyo make it back home? What about the other embassies personnel? PS: sorry for poor english (french here)
I can't give a general answer, but I can describe what happened in your specific examples.
American and Japanese diplomatic personnel were initially confined following Pearl Harbor as both governments negotiated for their return. Japanese personnel were kept with other Axis diplomats at The Greenbrier and The Homestead (two luxury resorts west of Washington, DC) during this time while American diplomats were confined to the grounds of the US embassy in Tokyo.
Once negotiations were completed, the diplomats were taken by cruise ship (the Japanese on the MS Gripsholm and the Americans aboard the Asama Maru) to Portuguese East Africa (Mozambique) where they were exchanged in July 1942. They then returned to their home countries on the ships that had brought their counterparts.
Richard Fearey, Ambassador Grew's private secretary, gave a fascinating oral history of his experience during this period which can be found here if you're interested in more detail.