That happens all the time though. It's not a big issue to switch to next gen, and the advantages are exactly the things that the current generation struggles to handle. I bet that Bethesda won't release Elder Scrolls VI and Starfield on Xbox One and PS4 even though they've probably had both under some form of development for the past 6 years, for instance.
CD Project Red were just unlucky that Cyberpunk arrived right in the seam between two generations. Xbox One and PS4 have an install base of about 150 million already. If they could have afforded to wait a year or two there would have been tens of millions of PS5 and Xbox Series X on the market, but they had to release it now for economical reasons, hence hellish crunch time and the desperate act of trying to get a bigger game to fit into a smaller box.