I’m experiencing the same behavior.
I’m providing a workaround at pytorch/pytorch#62323 6; it consists in only using the non-zero portion of the window.
Surprisingly enough, torch and scipy windows are constructed differently, which makes any comparison between torch.stft and librosa.stft even more difficult.