It's not our military that will deter China from invading Taiwan. The worlds private companies, except for the EU energy sector turned it's back on Russia. That's a concept I don't think the Chinese could even conceive of prior to it happening. The sanctions against Russia they probably forecast, though probably not at the level they are currently at. The military aid to Ukraine they probably forecast, though again probably not to this level. But, private companies walking away from Russia is something so foreign to the Chinese mindset they surely were slapped in the face and may not totally understand it today.
The flip side of that argument is this is the best possible set of circumstances for Xi and China to reunify Taiwan under the CCCP flag. Can the world mobilize to support two countries being invaded and cut out so much of it's economy and still remain stable? Xi's gamble would be no and he hopes that would force the west to accept the loss of Taiwan.
Taiwan is a long way from everything. We can't land in Poland and drive across the border like Ukraine. It would put a significant stretch on our Navy to support both the defense of Taiwanese straight as well as escort the relief ships from Japan and Australia. Likely historic redeployment of ships level of effort. If we turned our subs loose on the Chinese navy, it would be bloody for a couple of days then their Navy would either be at the bottom of the Taiwanese straight and South China Sea or permanently in port.
Ultimately it's a very real threat and one we have been preparing for. The only question is have we prepared in the right way?
Texas A&M - 148 years of tradition, unimpeded by progress.