The world wars were characterized by a near-total breakdown in international trade, the deaths of millions (who therefore can neither produce nor consume), and what was probably the complete collapse of the tourism industry. Those are global effects that will impact every country in the world (barring autarkies) even if they stay out of the war.