I can only see China invading after SMIC has matched the capabilities of TSMC. China wouldn't need TSMC anymore and if the rest of the world' tech sectors collapse then sucks for them but not China.
If China ever succeeds in outmatching TSMC in both process and wafer output, Taiwan would have already lost as the big reason for defending them disappears.