I think we need to handle the signal properly and close down the recording and go back and updated the WAV header.
In the mean time, my work-around is:
https://langdoc.github.io/2017-05-28-sox-trick.html
TLDR;
sox --ignore-length corrupted.wav fixed.wav