There have been at least three American missile tests that landed in Mexico. (They were launched from the US into the US, intended to land in the White Sands missile range, but overshot).
It depends. If North Korea were intending to bomb Japan, it'd be an act of war. I'm dubious they'd knowingly kick off a war by bombing Hokkaido though. So it'd more likely be an accident like the time the US bombed a Chinese embassy.
Whether anyone accepted the accident angle would depend on how willing various major powers were wanting to get involved in the incident.
But 9/11 would not be a good analogy, as it was not carried out by a nation. Which is why it took a month for the US to declare an illegal war on Afghanistan rather than immediately being able to declare a legal war in self defense.
https://news.google.com/newspapers?nid=1350&dat=19700804&id=... ("Mexcians find errant rocket", 1970)
https://wsmrmuseum.com/2021/11/10/in-1970-an-athena-missile-... ("In 1970, An Athena Missile Went Deep Into Mexico")