Thinking about it a little bit more, the US response to the conflict in Ukraine might not be a positive indicator towards what the US response to a Taiwan contingency might look like, but open up the potential for a new problem.
If it doesn't impact the mid-terms, the conflict in Ukraine will certainly impact the presidential election. If the Republican candidate wins, response to a crisis that threatens a democratic country will be seen as vital in their domestic political considerations. The debate on Taiwan in the US has been mixed so far, but this could be enough to tip the balance in favor of intervention when the actual shooting starts and people are (or will allegedly be) dying.
A historical example that might validate my theory is the state of the Russian attitude towards NATO following the 1999 bombings in Yugoslavia. The lack of Russian action on their periphery was not an indicator of Russian impotence, it triggered the chain of events that lead to the current conflict.
This isn't an inevitable outcome, however. There are some things China could do to discourage and prevent foreign intervention post-Ukraine-
1. "Formally" announce the expansion of China's nuclear arsenal. The exact number is secret, but if simple PR releases are not viable, there are ways to leak the size without actually leaking it. A Ministry of Foreign Affairs fact sheet from 2004 states China "has the smallest nuclear arsenal", which would imply less than 200 (the British nuclear arsenal at the time). China could quietly state somewhere that they have the 3rd or 4th or whatever largest nuclear arsenal which could indicate size to other countries "officially" without compromising the exact number. Eventually, the PLA will probably need to announce the activation of the new ICBM units anyways, so the cat will be out of the bag- there is no way China could keep its arsenal at such low levels while expanding its ICBM force to such an extent. But a direct announcement would go a long way in breaking the widespread belief that China's arsenal poses little to no threat to the US*.
2. Make a warning to other countries not to intervene when announcing the beginning of PLA operations, threatening a massive response but not using the "consequences you have never seen before in your history" type language, so as not to contradict China's no first use policy.
These two things would have a pretty good likelihood of keeping foreign intervention at bay; politicians in Japan, the US, and Australia accused of turning their back could merely take advantage of strategic ambiguity and claim they had no need to defend Taiwan due to the lack of a treaty obligation.
*This will be extremely important. During Biden's first press conference during the day following the beginning of the conflict, he specifically mentioned nuclear weapons as a reason why NATO intervention was completely off the table. Unfortunately, from what I can tell, many believe that a) the Chinese nuclear arsenal is small and insignificant or b) the Chinese nuclear arsenal is small and ABM can completely deal with it. Mere speculation regarding silo construction has not seemed to help the situation, from what I can gather from this forum, and looking at US political and think tank discussion on the subject of intervention.
The second thing would also be very important. Current discussion around intervention seems to focus upon a massive Chinese first strike which kills many Americans and Japanese. If this doesn't come, there will be a strong movement, especially in Japan (where despite its best attempts, the LDP has been unable to quell widespread pacifist sentiment), to not intervene. Regardless of the social media reaction, Americans are not up for another war according to polling regarding Ukraine. A similar situation could be expected if the "Red Dragon/Panda Bear/whatever" doesn't actually attack US forces as predicted.