Same issue with 4000+ photos. I've found a bad workaround #1 - move about 100 photos at once, reconnect USB and again. It takes a lot of time, that is why it is bad workaround.
Workaround #2:
At Iphone: Settings - Photo -> Download and Keep Originals
It will stay original format HIEC and transfer it to windows PC "as is". Also I don't have any issues while cut and past media from iPhone to PC via Windows Explorer. (at workaround #1 I saw error "Error Moving File or Folder: A device attached to the system is not functioning")
Download HIEC to JPEG converter to PC (I used iMazing HIEC converter https://imazing.com/heic) and convert all images at your PC
It takes less time then workaround #1
Hope it helps!