Articles of War 1757 as pertains t the Royal Navy:

In chief article 10: States:
Every flag officer, captain and commander in the fleet, who, upon signal or order of fight, or sight of any ship or ships which it may be his duty to engage, or who, upon likelihood of engagement, shall not make the necessary preparations for fight, and shall not in his own person, and according to his place, encourage the inferior officers and men to fight courageously, shall suffer death, or such other punishment, as from the nature and degree of the offence a court martial shall deem him to deserve; and if any person in the fleet shall treacherously or cowardly yield or cry for quarter, every person so offending, and being convicted thereof by the sentence of a court martial, shall suffer death.

However this does seem to be contradicted by article 11:
Every person in the fleet, who shall not duly observe the orders of the admiral, flag officer, commander of any squadron or division, or other his superior officer, for assailing, joining battle with, or making defense against any fleet, squadron, or ship, or shall not obey the orders of his superior officer as aforesaid in the time of action, to the best of his power, or shall not use all possible endeavours to put the same effectually into execution, every person so offending, and being convicted thereof by the sentence of the court martial, shall suffer death, or such other punishment, as from the nature and degree of the offence a court martial shall deem him to deserve.

Article 11 would exclude the commander of the 2nd ship, following the flag, from prosecution.

However article 12 damns the Commodore:
Every person in the fleet, who through cowardice, negligence, or disaffection, shall in time of action withdraw or keep back, or not come into the fight or engagement, or shall not do his utmost to take or destroy every ship which it shall be his duty to engage, and to assist and relieve all and every of His Majesty's ships, or those of his allies, which it shall be his duty to assist and relieve, every such person so offending, and being convicted thereof by the sentence of a court martial, shall suffer death.

And article 13, (unlucky for some), is the icing on the cake:
Every person in the fleet, who though cowardice, negligence, or disaffection, shall forbear to pursue the chase of any enemy, pirate or rebel, beaten or flying; or shall not relieve or assist a known friend in view to the utmost of his power; being convicted of any such offense by the sentence of a court martial, shall suffer death.

'and hereby by His own inaction is hoiste by His own petard'. M'Laud I rest my case.