The 7805 is supposed to shutdown when it gets too hot. Maybe yours is bad or is a counterfeit one.
I think it was at the hairy edge of shutting down.
But in this case what5 is meant by shutting down, I don't think they mean it has fuse like properties i.e it'll never work again.
I assumed it was shutting down, as I reduced the input voltage back to nearer 12 from 20V the 7805 'recovered' as it cooled and I got back to 4.6
at an input of about 12.5V. I'm sure if I'd would have left it off to cool
I would have got it back up to 5V.
Maybe I should test one to destruction.
aka let a student use it.
She canne take it any more captain, it'll blow the warp core.