It’s the dealers fault if they left the cap loose and overheating can definitely weaken a head gasket. At some point afterwards it may decide to let go.
Your culpability in this is not stopping when the car overheated. When the gauge rises towards the red you MUST pull over then and there.
That being said, it’s likely this engine has far more serious problems than a head gasket fault.
Severe overheating like this can cook cylinder walls, score pistons, and ruin piston rings by either seizing them on the pistons or removing the ring temper. (temper meaning springiness)
If coolant diluted the engine oil then this can damage crankshaft bearings. Either of the above means a complete engine overhaul.
There is no way I would consider replacing a head gasket on this car without performing a compression test to determine if ring damage exists (and even that is not 100% definitive) on the cylinders not affected by a head gasket breach.
Failing to do this may mean that you end up with a smoking, oil burning engine with a new head gasket.
Just my opinion, but this problem was caused by the dealer and they should pony up at least halfway on the repair as their failure to tighten the cap initially caused this problem and your failure to stop the car when overheating also contributed.