Japan will gradually end its special measure to offer extended stays for foreign nationals unable to return to their countries due to the coronavirus pandemic.