Unless they’re captured in battle, and then they become prizes of war.
During much of the Napoleonic Wars, Britain got almost half of her Royal Navy tonnage from captured French and other combatant vessels.
The attack was executed by the Royal Navy anticipating a Declaration of War between Britain and Spain. However, the attack occurred before war had begun. This vessel was not a prize of war, and the British crew did not get their prize shares.