Critics of the police handling of a Sarah Everard vigil in south London spoke out "without knowing the facts", the Met Police chief has said.
Dame Cressida Dick told the BBC that remarks during a "social media pile-on" had damaged confidence in policing.
The force was criticised after women were handcuffed and removed from crowds on Clapham Common, but a report has said police acted "appropriately".
The Duchess of Cambridge's visit to the vigil was legal, Dame Cressida added.
Ms Everard was last seen walking home nearby on 3 March. Her body was found a week later in woodland near Ashford, Kent - prompting a public debate over women's safety
Several hundred people gathered on Clapham Common on 13 March to pay tribute to the 33-year-old, despite Covid restrictions.
Dame Cressida said it was "clearly possible" under the law for those who lived locally to walk to the common and "lay flowers legally".
"You would have seen for six hours we did not enforce any laws, we showed some discretion and we allowed people to carry on," she said.
But the Met chief said she had warned City Hall and senior members of the government the event was likely to become an illegal mass gathering and could end with arrests.
"What I was saying consistently was this is likely to be illegal, if it is illegal and people do not disperse when they're asked to do so, we will use as much discretion as we can, we will encourage people, we will try to get them to disperse, but if they don't disperse we will end up arresting people," she said.
An official event had been planned by Reclaim These Streets - but the group called it off, saying police had failed to "constructively engage" on how it could be held in a Covid-secure way.
People turned up to Clapham Common despite the group asking them not to.
Referring to the Duchess of Cambridge's visit to the vigil, the Met chief said she was "in the course of her duties, she was working."
She added: "At that point people had a whole series of potential reasonable excuses for being away from home, we didn't all have them.
"I've picked out one that may apply to her but, let's be clear, there was a very calm vigil to which she attended where lots of people came."
When challenged on her previous remarks that she would have attended the vigil if it had been legal, Dame Cressida said: "What we knew is that it was quite clear that what ever the organisers wanted to arrange, the numbers were going to be overwhelming, there was not an ability, in the long run, to be able to keep this socially distanced... Covid safe or strictly legal."
The duchess's visit was not listed in the daily list of royal engagements - the Court Circular - so it was not an official engagement. Palace sources at the time said it was a private visit, which can constitute a royal duty, but it would still usually be listed in the Court Circular.
On Tuesday, Her Majesty's Inspectorate of Constabulary and Fire & Rescue Services (HMICFRS) found that the force was "justified" in deciding that the risks of transmitting coronavirus "were too great to ignore" and officers "did their best to peacefully disperse the crowd".
However, it added that "there was insufficient communication between police commanders about changing events on the ground".
Images and footage from the vigil prompted widespread concern, but HMICFRS said calls for Met Police Commissioner Cressida Dick to resign - including from Liberal Democrat leader Sir Ed Davey - were "unwarranted".
The report added that "the chorus of those condemning" the force after the event showed "a distinct lack of respect for public servants facing... a sensitive and complex situation".
A spokesman for the Lib Dems has said: "We stand by our view that in the circumstances, the Met commissioner got the judgment on the vigil badly wrong."
'Stop and think'
Dame Cressida said: "I think there are two things that come out of this report about the immediate aftermath.
"The first is that people in public life, people in responsible positions, should stop and think before they judge, whoever they may be."
She added: "If they comment without knowing the facts, they may - and I would suggest on this occasion some people did - affect public confidence in their police service inappropriately.
"And, secondly, affect the officers' confidence about volunteering for the same duty in the next instance, if they are actually going to be criticised even when they've done a really good job."
Dame Cressida said the report suggested that if the force had been "slightly more conciliatory" in communications afterwards, "then that might have helped with what I think is, in modern-day parlance, a kind of social media pile-on".
An inquest into Ms Everard's death has been adjourned until the conclusion of criminal proceedings.
PC Wayne Couzens, 48, has been charged with her murder and kidnap.
He has been remanded in custody to appear at the Old Bailey on 9 July ahead of a trial that is set to start on 25 October.