> A dictatorship with the explicit goal of invading Taiwan, which is not only a close ally, but also of global geostrategic importance.
I think it's a safe bet that China will invade precisely when they think this won't cause them severe negative losses.
This will likely be when Taiwan finds itself no longer a close ally of the USA, nor of global geostrategic importance.
Of course, "safe bet" doesn't mean "in all possible timelines"; they may end up echoing the Bay of Pigs, Hormuz, or stumble against the hubris that turned the assassination of Archduke Franz Ferdinand into a world war where all belligerents had the mistaken belief they would win.