Except they don't entirely. As soon as the monorepo interfaces with the rest of the world (like with npm packages, let's say), the problem just gets shifted onto the person trying to import/update a package. Which is further hindered by policy that discourages more than N versions of any given package.
Not that I'm against the policy or how it works. It just isn't "avoided" precisely.