We had this issue with HKG recently. We always get charged the HKD$120 tax, as they assume worst case we will always be landed in HKG and re-processed. If we are lucky enough to get an onward bp at first sector check in, we can keep it all and make a claim to the airport authority / govt department to seek a refund.

Not sure if Japan works in a similar way