To support your point, consider the long list of assumptions underlying "Comparative Advantage", such as at:
https://efinancemanagement.com/international-financial-manag...

A key assumption being: "Factors of production are fully employed in both the countries. ... The theory assumes full employment. However, every economy has an existence of underemployment."

Another key assumption is "The labor cost determines the price of the two commodities. ... The theory only considers labor costs and neglects all non-labor costs involved in the production of the commodities."

One assumption not listed there is an implicit assumption as in much of economics of infinite demand for anything and no law of diminishing-to-negative returns when considering the environmental and psychological costs of consumption.

So, if you have unemployment in the producer country like China (meaning, there is no reason for them to limit their production) along with a significant capital investment in production infrastructure (like in the Shenzhen region for electronics), and you have limited demand in the consumer country like the USA (meaning, only so much can be sold there at any specific time), then the country which can produce stuff more cheaply will just flood the market of the other country for all goods in question -- even if the consumer country could in theory produce one of the goods at higher costs (or lower quality). Of course, there may eventually be macroeconomic issues like balance of trade issues and countries unable to pay for more goods (which the USA has avoided to date because the US dollar is the refactor global currency backed by the USA's global policing role for decades as a defacto empire). But even if labor in the consumer country like the USA is free, given realistically a lot of cost related to equipment and energy (and increasingly AI and robotics) and more nebulous things like supply chain integration and a can-do attitude, the consumer country may not be able to compete on price and quality of finished products from the more materially productive economy.

Tangential, but "Humans Need Not Apply" makes a good argument when they suggest that horses are essentially obsolete in modern industry (in the same way people may be soon). It's not that you sometimes use horses to any great degree in modern manufacturing (whereas before they pulled carts and turned machines) -- it is that for almost any industrial task horses are more trouble than they are worth now in terms of cost and reliability compared to electric motors or diesel engines and so on.

An economic theory like "Comparative Advantage" that entirely emphasizes labor costs is increasingly obsolete if human labor is less and less a major factor of production. The theory assumes a country will always have people doing something productive, but that is like saying we should bring horses back into factories when robots are generally more reliable. If people are not skillful with access to tools and capital and don't have a can-do attitude, then they will just suffer economically (unless protected somehow) No doubt there are special cases where horses are still useful in production or transport like how mules were used recently to get supplies into hurricane damaged North Carolina, but they are rare as long as the modern industrial system and its surrounding infrastructure functions well. Similarly, there may still be human roles in production, but they will continue to diminish. In 2010, I put together some options for dealing with this situation, available here:
https://pdfernhout.net/beyond-a-jobless-recovery-knol.html