Hello,
I stumbled on a windows-only bug in pg_basebackup which I've reported as #16032 (https://www.postgresql.org/message-id/16032-4ba56823a2b2805f%40postgresql.org)
I'm pretty sure I've fixed it in the attached patch.
Many Thanks,Rob