This call to GetBibioData seems without purpose: https://github.com/Koha-Community/Koha/blob/2fe2ef41bd8bf2f142597e39f493edbdbf75c8a3/misc/migration_tools/bulkmarcimport.pl#L418 $biblioitemnumber is either overwritten on the lines below, or update/create failed/was skipped and the later AddItemBatchFromMarc will fail anyways.
Ok, seems like ModBiblio returns 1(!), not id and itemid. So the lvalues for ModBibilio must be removed. I think I saw another bug-report on this somewhere. Think this takes some more effort to fix, AddItemBatchFromMarc should only be run on insert, so the line can still be removed. But some further refactoring is also needed.