That whole matter was a case of clueless politicians (not clueless admirals), agreeing that despite fact that the Federation's enemies had cloaking devices, the Federation would not develop one.
The Federation: "Our enemies can build all the aircraft carriers they want, we will ethically keep using battleships."
Algeron isn't just about ethics though. It's about shrewd diplomacy... The chess game that they always play with Romulus. The UFP isn't actually at war with them. So to act in a manner that considers them an enemy, makes them one in response. It also makes the UFP the instigator in the arms race.
Romulans
had cloaking tech. UFP did not. For them to pursue it thereafter makes them the provocateur. It's bad form, bad policy & bad faith to be on the chasing end of what is to be an arms race, & the UFP's whole existence relies upon it being benevolent. They can't afford to be seen as arms race aggressors. It undermines their whole point. They're not an empire. They operate a trust. Skulking around in shadow stands in enough opposition to that, that their allies lose faith, & bail. Y'all don't look so benevolent no more
By acting to balance or outdo someone's tactical advantages admits a state of aggression, & sometimes it's necessary, when the stakes are high enough, but we're only talking about stealth tech. It's not like it's nukes, like how the U.S & USSR arms race came to a head.
The only way to potentially nullify that kind of WMD tech advantage is to match it. Not so with stealth tech. They already use tachyon fields to find ways around it. Cloak detection is far greater an answer to cloaks than tit for tat cloaks, & far less diplomatic suicide. Besides, when you have good faith diplomatic channels open to you, like with Klingons for example, you can grab a cloak, if you really need to get a hold of one
The gain/loss ratio tips heavy to losses if you chase down that tech. So you can be invisible to a degree. You potentially lose allies. You're not as easy to trust. Who wants to get mixed up with a federation that's supposed to be peaceful, but is actively looking to match outsiders tactically?
The thing about stealth tech is that eventually people figure out you have it, & then they're wary of you, & not just one group of people, but everybody. You can't maintain a union of peoples that way, & that's exactly what the Romulans want to happen, for the UFP to fall apart getting dirty with them. Klingon alliances being weakened etc..,