Undeterred by Beijing’s economic retaliation for Sanae Takaichi’s Taiwan remarks, voters endorsed the prime minister’s unyielding stance on China.