I wonder if LLMs will push the industry towards protecting their IP with patents like the other branches of engineering rather than copyright. If you patent a general idea of how your software works then no rewrite will be able to lift this protection.
If there wasn't a specific limitation against software patents, you could patent the process of "first we look at the first 3 bytes for a BOM, then we take statistics of the most frequently used bytes and match them against this table..." which is the software equivalent of "the device contains a large box full of water, underneath which is a flame and on the upper side is a pipe leading to a valve box which contains..."
Either one would still have to meet the requirements like being sufficiently non-obvious. The first steam engine was patented, even though you couldn't patent one any more.