First of all, StarFleet ship fighting StarFleet ship is an exceedingly rare occurrence in universe and, the fight between the Defiant and the Lakota aside, always a result of a crew being subdued or manipulated or a ship being commandeered in some way. Alien entity taking control of crew and/or ship, mad computer, etc...
The short-lived battle between the Lakota and the Defiant is the only known occurrence of a fight between two StarFleet vessels manned by StarFleet crews that were not under some sort of alien influence. Although the crew of the Lakota acted under false information provided by Admiral Leyton, even though Captain Benteen knew the truth as she was part of the conspiracy.
Since, as shown in Wrath of Khan, an override to the use of the prefix code exist, it seems logical that two StarFleet ships manned by StarFleet crew fighting each other would activate that override before the fight begins, to avoid their opponent using it against them, thus making this action useless. Thus why Benteen or Worf didn't even attempted to use it.
From what little we hear and see about it on screen, it seems that the prefix code is a measure designed to retake a ship that has fallen into the hands of someone else than the Federation. It would be quite improbable that those people wouldn't know about the prefix code, since it seems to be known only by the upper echelons of the hierarchy, thus giving a major advantage to the recovery crew, allowing them to control the commandeered ship at a distance and avoid loss off life when they beam in to effectively retake command of the ship.
It would also seem that the prefix codes are available only to the Admiralty: Kirk was Admiral when he fought the Reliant under orders of Khan, and Picard had to call an Admiral at StarFleet Command before he was given the prefix code of the Phoenix.
It would be logical that, for security reasons, prefix codes are held in a secure computer memory somewhere at StarFleet Command, and not stored in the memory banks of every StarFleet vessels, to avoid an enemy obtaining them when they capture one ship, or even comb through the wreckage of a destroyed StarFleet ship.
It would also explain why, in Insurrection, Admiral Dougherty doesn't give the Enterprise's prefix code to the Sona: the Briar Patch was preventing communication with StarFleet, and it is doubtful that the Admiral would have carried the information with him on the Sona ship for security reasons. It's not the kind of information that you would transmit to a ship of another organization, even an ally, or transport in a briefcase.
As for the fight against the Prometheus, since we do not see or hear the crews of the StarFleet fleet during the short battle, we cannot know if they tried it or not. Given the efficiency of the Tal Shiar, the Romulan Secret Service, it is conceivable that they managed to learn about the prefix code and its override, and that they activated the override beforehand. We do not know enough about what led to the events seen in the episode to be able to draw a conclusion.