You can put in a loop to start checking to see if you can get a write lock on the file:
While ($True)
{
Try {
[IO.File]::OpenWrite($file).Close()
Break
}
Catch { Start-Sleep -Seconds 1 }
}
As long as the file is being written to, you won't be able to get a write lock, and the Try will fail. Once the write is complete and the file is closed, the OpenWrite will succeed, the loop will break and you can proceed with copying the file.