Japanese PM Sanae Takaichi had suggested Tokyo could take military action if Beijing attacked Taiwan.