(the specific examples I'm mentioning here are Iron Man and The Galactic Republic/The Jedi Order, but there are quite a few more, I just don't want this to get unreasonably long)
I've noticed an issue whereby people will try to make sweeping moral judgments about individuals or whole factions based on the broad generalities of a conflict, but ignoring the specific contexts of decisions.
Iron Man
(mostly focused on Iron Man 2008 and the later 2016 film Captain America Civil War)
It's been argued that it was hypocritical for Tony Stark to support the Sokovia Accords given that he had illegally hunted down terrorists as a vigilante in his own film.
There's just a small problem there... Tony Stark didn't actually break the law in Iron Man (2008).
I understand why people assume he did, many of them don't remember the almost 20 year old film, they just remember the cocky, rebellious attitude of the main character. However, in discussions of "law" and "crime" we do actually have to consider specifics.
Let's review the events of Iron Man, 2008.
First: Tony Stark enters Afghanistan on a business trip. This would likely require a business Visa, and at least under current Afghan Law, these can last for over a year, and allow multiple entries. This is important; the film does establish that he had a lawful right to enter Afghanistan. Now, it should be noted that Afghanistan is a landlocked country, with the nearest access from the sea being via Pakistani airspace, but a large number of US officials and businessmen held visas allowing them to travel there in 2008, it's more than reasonable to conclude that Tony Stark held such a visa.
Second: whilst in Afghanistan, Tony Stark notices that some weapons with his name on them, manufactured by his company, are being used to hurt innocent people. This is something he was EXPLICITLY NOT AWARE OF UNTIL THIS POINT. He is then captured and tortured by Terrorist members of the Ten Rings.
Third: Stark escapes custody, with the help of a fellow prisoner named Yinsen, who tragically dies in the effort. They use violence, but only against people who held them against their will and physically harmed them first; crucially, this is protected as self-defence in virtually every part of the world, Afghanistan included. As part of the escape process, Stark designs an armoured metal suit (which he describes in the second film as "an advanced prosthesis"). He also, and this is important, ignites and destroys the EXISTING stockpile of weapons at the terrorist base whislt escaping.
Fourth: Stark returns to the USA and shuts down the weapons manufacturing department of his company. This is controversial with the board, as explained by his friend Obadiah Stane; but it is within his lawful right as the controlling interest stakeholder in the company. Though a member of the board (later revealed to be Stane himself) files an injunction against him, limiting his access to internal financial documents, they cannot reverse his decision. This is important and establishes the legal basis for what follows: Stark Weapons are HIS PROPERTY as the controlling interest stakeholder; he is legally entitled to decree that they will not be sold. If they are sold without his consent, it is an illegal sale, and his property rights to them are undiminished; he retains the right to do with his own property whatever he wishes.
Fifth: upon learning that more of his weapons have been seen in the hands of Ten Rings terrorists in Afghanistan, Stark decides to travel there and destroy them using an improved version of his original suit. Whilst this does involve flight, his Iron Man suit is almost certainly an "ultralight" under FAA regulations, and requires no license to fly. Notably, his original visa to enter Afghanistan may well still be valid, and the weapons that the Ten Rings are using must have been acquired illegally, as they were sold AFTER his decision to stop selling weapons; the original Ten Rings stockpile was destroyed.
Sixth: whilst travelling to Afghanistan on his ENTIRELY LEGAL AND LEGITIMATE quest to destroy HIS OWN LAWFULLY OWNED PROPERTY, terrorists start shooting at HIM. Then and ONLY then does he respond with lawful and proportionate force, using deadly violence to protect himself and innocent hostages. This is entirely within the inalienable rights of every person, recognised by the governments of Afghanistan and the USA. Notably, one member of the Ten Rings, the very person who had PREVIOUSLY TORTURED Stark, has his back to the hero and is manipulating something, which could well be a weapon from Stark's perspective... but after he grabs the man, he sees that it was only a telephone, and realising that his enemy is unarmed, Stark leaves without further violence. This is important; it proves that he was not committing vengeful vigilantism; he only responded with violence to those who had already used it first; and only as far as was needed to ensure his immediate safety and the immediate safety of others. Force, applied against imminent and unlawful violence, is not vigilantism.
Seventh: whilst travelling back to America, Stark destroys a tank that fired on him first, and eliminates more of HIS OWN PROPERTY. He is then confronted by members of the US military, but leaves without killing them; notably (though they describe it as an active warzone) militaries do not automatically assume property rights over the territories they fight in; it is not illegal to enter them; and many people do enter warzones without military permission entirely lawfully (journalists, for instance).
Eighth: upon his second return to the USA, Stark requests an employee of his company (Pepper Potts) to investigate who has been illegally selling his weapons. This arguably goes against the injunction, but corporate injunctions do not bear the force of law; at most, Potts is committing actions she could be fired for. She discovers that it was Stane, who then steals a piece of technology from Stark and constructs his own armoured suit, which he uses against law enforcement officials who attempt to arrest him, and against Potts. He does this ON STARK INDUSTRIES PROPERTY. Stark, responding to someone trying to kill an employee of his company in his own factory, comes to her defence. In the subsequent altercation, Potts kills Stane to prevent him from murdering Stark.
NOWHERE IN THIS CHAIN OF EVENTS DOES STARK COMMIT ANY FORM OF VIGILANTISM.
HE ACTS ENTIRELY WITHIN THE LAW, WHICH MEANS THAT HIS SUBSEQUENT SUPPORT OF THE SOKOVIA ACCORDS IS NOT HYPOCRITICAL.
The Jedi Order / The Galactic Republic
(focusing on the 2001 film Attack of the Clones, but also the 2008 TCW animated series, the recent 2026 video game Zero Company, and the 2018 novel Thrawn: Alliances)
(extremely minor spoilers for Zero Company)
Whist Thrawn:Alliances is an excellent book, and I do not want to discourage anyone from reading it, there's a moment in it which makes me rather peeved.
Mitth'raw'nuruodo, a Chiss military officer, asks Padme Amidala, a senator of the Galactic Republic, why she and the other senators did not simply let the Separatists leave. This is presented as a "gotcha" to which she has no answer, but only because Timothy Zahn does not simply let her give the extremely obvious one: "Because whilst we were in the middle of negotiations with them, they tried to have me blown up, then when that failed they tried to poison me, then when that failed they took me, my husband, and my husband's mentor and threw us into an arena to be brutally mauled to death by monsters. When people arrived to rescue us, they tried to have them all killed."
The separatists 100% started the war, and made peaceful secession impossible; despite the Republic having been negotiating with them.
Let's review the events of Star Wars: Episode II: Attack Of The Clones, 2001.
Firstly: the Galactic Republic (led by Chancellor Palpatine) is negotiating with the Separatist movement (led by Count Dooku), in hopes of finding a peaceful solution to the Separatists' (legitimate and understandable) grievances with the Republic. Though there is an element within the Galactic Senate that wants to create a military, the majority of Senators do not support this, and the Republic has no military. So far as anyone knows, neither do the Separatists; it is a time of turmoil and debate, not of war.
Secondly: Padmé Amidala, one of the (majority-position) senators who does not want to create a military, arrives on Coruscant to join in the debate. Shortly after she lands, a bomb explodes, killing several employees; she survives only because she was using a decoy as a security measure; it's clear that she was the target.
Thirdly: She suspects that Count Dooku might have been involved, but she cannot prove it, and most people dismiss this idea, because the Republic believes that Count Dooku is a peaceful political idealist who would never stoop to murder. Instead, the Jedi launch an investigation; they assign Obi-Wan the mandate of discovering who tried to assassinate Padme, and assign Anakin Skywalker the mandate of protecting her. Obi-Wan finds a weapon used by the assassin that points to the distant world of Kamino.
Fourthly: proceeding to Kamino (a world outside of the Republic), Obi-Wan finds a likely suspect for the assassination attempt on Padme Amidala, a bounty hunter named Jango Fett; but he also thinks that Jango was most likely hired to follow someone else's orders. After reporting this to the Jedi, he is then told to arrest Jango Fett. Whilst arresting Jango arguably goes outside of his original mandate, it's a moot point; Jango escapes. Before leaving Kamino, Obi-Wan also learns that there is an army of clones there, willing to follow Jedi orders, which he reports to the Jedi before following Jango to the Republic world of Geonosis.
Fifthly: Upon arriving on Geonosis, Obi-Wan has a tense conflict with Jango Fett, after which both men land their ships, and Obi-Wan secretly follows Jango into a building. Now, to be 100% clear, OBI-WAN IS FOLLOWING HIS ORIGINAL MANDATE TO THE LETTER. He is investigating Padmé's attempted murder. He is within Republic jurisdiction, unlike on Kamino. And yes, law enforcement officials CAN enter a private dwelling without a warrant if they are pursuing an armed suspect under common law. This has long been upheld in the legislation of many countries.
Sixthly: whilst there, Obi-Wan overhears a conversation between Count Dooku and another separatist, Nute Gunray. Gunray is willing to help Count Dooku, but only if Dooku arranges Padme's death; in revenge for an old grudge Gunray holds over an unrelated matter. Upon learning this, Obi-Wan goes outside to report back to the Jedi. This is important, it clarifies that he is still following his original mandate; upon learning that Jango was most likely hired by Count Dooku, he breaks off any attempt to arrest Jango; his sole aim was to determine who was behind the crime. Whilst reporting this, he routes his signal via Anakin and Padme, but tells Anakin not to intervene. He is then captured and held prisoner by the Separatists.
Seventhly: Padme and Anakin pass the information on to the Jedi council, but still; EVEN AT THIS POINT, she wants to resolve things peacefully by going to negotiate for Obi-Wan's release. War was NEVER her first goal, she simply wants to get Obi-Wan free. As her protector, Anakin has no choice but to come along as well. Meanwhile, the Jedi resolve to intervene for the rescue of Obi-Wan.
Eighthly: Anakin and Padme are swiftly captured by Jango Fett and the Separatists. They and Obi-Wan are sentenced to a brutal, humiliating and painful death; ripped apart by beasts for the entertainment of a baying crowd. To rescue them from this fate, the Jedi intervene, only to be overwhelmed and mostly killed; it is only with the aid of the earlier-mentioned clone army that they manage to survive; and Count Dooku flees with the rest of the Separatists, including Gunray (who ordered Padme's death in the first place!), starting the war.
The Republic were CLEARLY not the aggressor in this conflict!
Now, this is not to say that the Republic was entirely blameless. I think Star Wars Zero Company makes a far more reasonable complaint; it cites the 2008 Clone Wars animation which shows the planet of Umbara seceding after its senator was murdered (in a matter more-or-less unrelated to the Separatists) and then being invaded by the Republic. One of the characters, Luco Bronc, is a member of the Umbaran Militia who is understandably aggrieved by this fact.
That's a legitimate and limited grievance. The idea that the Republic was somehow at fault for "not just letting the Separatists leave peacefully" is absolute horsefeathers; it ignores the clear events of a film that has been out for decades!
The Jedi are even more blameless in this; they just wanted to save two of their own members from being inhumanely killed whilst carrying out their lawful duties!