You can look to the dmesg traces when wsl will unstuck.
It happend to me too and I saw there was some lock with the keystroke in bash
Edit: It happened to me recently again. I'm using wsl2 (debian) via the console of vscode and, sometimes, when I type a new command (make) everything get stuck for few seconds (and sometimes forever).
Each time it happens I see the same trace in the system logs of linux.
To get this, you can write dmesg -T in the console (when it unstuck).
The trace is
pts pts11: sig=22, tty->pgrp == NULL!
I still didn't find any solution to this.
Maybe you can use the same `dmesg -T command to get a hint on what happend to you