In the War of 1812, the USS President was captured by the Royal Navy.
Wikipedia gives the final actions of the day:
President ceased fire at 7:58 pm and hoisted a light in her rigging, indicating that she had surrendered… Following the standard practice, Endymion ceased fire and hove to for repairs once President had surrendered. Endymion could not immediately take possession of her prize, as she had no usable boats; Decatur took advantage of the situation, despite having struck, and made off to escape at 8:30 pm. Endymion hastily completed repairs and resumed the chase at 8:52 pm. At 9:05, Pomone and Tenedos came up with the heavily damaged President, unaware that she had already struck. Pomone fired two ineffective broadsides (there was minimal damage to President's starboard side) into her, following which Decatur hailed to say that he had surrendered. Shortly afterwards, Captain Lumley of Pomone took possession of President.
By attempting to escape, had the President not faked a surrender? This would IMHO qualify as perfidy under modern laws of war, and as a war crime. Yet Wikipedia's article on Stephen Decatur (who was commanding the USS President) indicates the British weren't offended at all:
Soon Majestic caught up with the British fleet. Decatur, now dressed in full dress uniform, boarded Majestic and surrendered his sword to Captain Hayes. Hayes in a gesture of admiration returned the sword to Decatur saying that he was "proud in returning the sword of an officer, who had defended his ship so nobly." Before taking possession of President, Hayes allowed Decatur to return to his ship to perform burial services for the officers and seamen who had died in the engagement. He was also allowed to write a letter to his wife.
Why would the British not be offended?
I think a key part of this is whether the President's captain intentionally faked the initial surrender. Since Decatur could not know the exact condition of the Endymion but was well aware of the condition of his own vessel (and the increasing proximity of the rest of the British squadron), I think he genuinely intended to surrender his ship.
Once he saw that the Endymion was in a similar condition and also was not making any obvious moves to send a prize crew to take control of his ship (as the Endymion had lost her boats), he saw a chance to escape. The position is similar to a POW on the battlefield who suddenly finds that his guards are looking the other way and makes a run for it. So it wasn't as if the surrender had been a ruse from the outset.
Also since the British ultimately captured the President a short while later (with no further loss of life), there was little time for any resentment to build on the British side and they had their prize (money).
As a contrast, at the Battle of Lissa in 1811, a similar situation involved the French frigate Flore. The ship had suffered from heavy damage in the battle and had apparently surrendered. However, the smaller British squadron was in no position to take immediate possession of the prize. The Flore took advantage of this to set sail for the French harbour on Lesina.
The key difference between the two situations is that the Flore indicated to the British ships that she passed that she had surrendered (and was effectively a non-combatant) to get by them and successfully escape.
In surrendering and then escaping, the officers of Flore had breached an informal rule of naval conflict under which a ship that voluntarily struck its flag submitted to an opponent in order to prevent continued loss of life among its crew. Flore had been able to pass unmolested through the British squadron only because she was recognised to have surrendered, and to abuse this custom in this way was considered, in the Royal Navy especially, to be a dishonourable act.
So it was the actions of the ship in repeatedly abusing the condition of surrender (quite possibly exacerbated by the loss of the ship as a prize) that upset the British in this earlier case.
Courtesy of a comment below by Samuel Russel, this particular salient point must be borne in mind while reading the following:
Surrender needs to be effectively received. The lack of efficacy was obvious to Endymion: President was capable of flight.
To apply modern rules of war to events of two hundred years ago is absurd.
Further, it has always been the case that much more liberal use of ruses of war is acceptable in naval warfare than land warfare.
In 1863, in preparation for the Emancipation Proclamation, Lincoln commissioned the Lieber Code, which were subsequently published as general Rules of Engagement for all Union forces. Article 101 of that states:
While deception in war is admitted as a just and necessary means of hostility, and is consistent with honorable warfare, the common law of war allows even capital punishment for clandestine or treacherous attempts to injure an enemy, because they are so dangerous, and it is difficult to guard against them.
Under this statement, much closer to general standards of 1812 than today's Hague and Geneva Conventions, perfidy involves "clandestine or treacherous attempts to injure an enemy" and not mere deception.