This was quite the rabbit hole, and unfortunately I think the ultimate answer is: sorry, but this probably won't work due to known issues within Factorio itself. I have added a warning in game for this (when it's attempted and is probably happening), and added this to the known issues.
That said, if you were doing this with a Blueprint in your Inventory, then I have probably included a fix for the situation. If you were doing this from the Blueprint Library, then there's nothing that can be done and you'll have to work around it.
Basically, Factorio seems to have one defined way for a mod to handle this situation, but it handles that process quite differently for each workflow - mainly due to complicated code internals and not for providing a sane or consistent API. Copying, Copying to a Blueprint, Selecting new contents for a Blueprint in your Inventory, and Selecting for one in your Blueprint Library are literally all following the same API but with different data. The two selection methods fail to provide the expected or necessary information. The Inventory process only has a potential workaround since we can use a separate API to get some identifiable information to make the updates another way.
Finally, the preferred route is to have this resolved within Factorio - numerous other mods and users know of and have brought this issue up. If that's not working, and if this is a large problem, then I can start to imagine some other workarounds that require user intervention (so by no means a proper solution).