In the case of Ukraine (and Taiwan) there is no realistic possibility of victory without US military intervention, and so, yes, were I advising those governments I would advise them to conciliate their powerful neighbors to the maximum extent feasible, and if attacked to surrender, since if I were in charge of the US military I would not deploy forces into what amount to death traps far from home.
The vessels of I believe 7 nations other than China patrol the south and east China seas.
If China made it across the straight, they vessels would have no chance making it back to ports that are all blockaded.
If China attacks Taiwan, the ports will be blockaded and all china import and export trade will instantly cease to be.