Need help finding flaw in the voltage regulator circuit
Your output transistor is a high-voltage part and has exceptionally low hFE, as low as 5 at 5A.
If the hFE is actually, say, 10, at 5A out, the poor BC547 is being called upon to deliver 0.5A with around 13V across it. That's 7.5W in a TO-92.
Reminds me of a problem I had recently (actually it was metalworking rather than electronics, but the principle is the same) that caused a couple of my devices to stop unlocking from the fingerprint sensor for a month or so.