ESC problem :/
5 minutes is a good run time for an EDF. I guess you've simply run the battery down and that's why it's cutting off. The battery will recover slightly which is why you get a few more seconds power out of it but basically it's empty.
It's not a problem it's just the way electric power systems work.
BTW you always get the worst results on the bench. In flight the motor unloads a bit and takes less current with everything getting less hot. Too much bench running with no airflow can kill a system faster than anything.
Steve