Divisions in Taiwan over how to approach China and how closely the island should align with the United States risk undermining important investments in defense and resilience.