If you start a unit test run, then cancel the process (which also aborts the unit tests in SF), if you try to rerun the same execution from the Run panel no debug logs are retrieved any longer. Looking in Salesforce, it looks like the debug levels across the board are reset to None when unit tests are aborted.
I'm not sure what the options here would be, since you don't really know what the debug levels should be if you just click rerun (and not start a new run from the top right). Maybe keep track of the last ran configuration and use those settings?
The scenario I've encountered this in the most is I started running unit tests and then realized my changes weren't finished deploying yet, so I cancel out. Once the deploy is done, I try to rerun the failed tests again, but since I canceled no debug logs come back.