I didn’t use the torch long enough to reproduce the bug you describe. However, I’ve had an issue twice where the torch wouldn’t turn on at all. I had to reboot the device to get it working again. MAy be both bugs are related.
If the battery drops below 15% the torch can’t be used until the phone has been charged to a bigger amount, if you search the forum you can find how much.
If your charge wasn’t that low, then maybe it could be a heat protection mode?
I changed the title from “Torch dies (JP2026)” to “Torch shuts off after 20 minutes and only works again after cooling down” because, without opening the thread and reading the additional information, someone might think that the LED had been permanently damaged.
I think the OS should be reporting “disabled by heat protection”, just like it is able to say “disable by privacy mode” (assuming the OS gets the feedback from a hardware line).