Are we talking union contract or non union? I have personally dealt with MEBA interpreting the port of engagement being the union hall which the member cleared from. That circumstance was not an international boarding though.
Likely the port where you signed articles, I’ve signed on many ships overseas and my discharge always listed the overseas port. Does your contract specify return airfare on completion?
I doubt Japan would allow you to be stranded in their country for long