>>>In the flowchart the second and third timelines are joined by a dashed line
This representation in the flow chart means that the end action of the third timeline is overidden.
This means that the end action of the third timeline will not be played.
Please check in the Second Timeline's properties in the Property panel, you will see a Override option.
You must have set this to return to the main menu. If you want to execute the end action of the third timeline, then you will have to remove this override from the properties of second timeline and if you do that then the dashed line in the flowchart will convert into a solid line.
I think this should solve your problem.