In Anglo-American common law, if a party has previously argued a position in one of their own cases, and later argues a different position in a subsequent case that they've a party to, then the doctrine of equitable estoppel would foreclose on certain claims from that party. As usual, the devil is in the details.
Firstly, they must be a party to both the prior and prospective case. A motorist that is injured in a multi-vehicle pile-up cannot assert different facts when suing each of the participants in the crash. However, an advocacy group that files a petition on behalf of another is, by definition, not the party that is bringing suit. Nor is anyone that offers an amicus (ie "friend of the court") brief that advises the court on how a case ought to be decided.
Secondly, the exact things which are foreclosed will depend. The most common benefit available under equitable estoppel is the loss of a presumption of good faith. So if party A is a corporation and claimed in an earlier employer/employee case that their CEO's crass, sex-pest behavior was a result of substance abuse (in an attempt at a medical defense or a defense about temporary inability to perceive the situation), then that assertion -- irrespective of whether it actually won them that earlier lawsuit -- could be used against them in a later case litigated by the shareholders. If the company is sued for the CEO not conveying accurate business info, the defense that their CEO acted in good faith is not going to carry water, if the events coincided in time.
As you can see, the exact remedy that equitable estoppel provides isn't exactly clear-cut in every instance. But the goal is to prevent the same litigant from abusing the judicial system. One cannot come into court on Monday claiming the sky is blue when it's convenient for them, then claim on Wednesday that the sky is not blue when it's inconvenient for them. Two-face assertions are not allowed.
To be clear, these must be actual assertions. Sometimes a civil case can be won merely by the likely possibility that someone else is at fault, making it impossible to determine fault. And so no assertion may be needed as a defense. If a pedestrian is struck and injured by a hit-and-run motorist driving a red car, and five red cars are identified later, any of those motorists can correctly state that there were four other such cars in the area. Pointing out facts unfavorable to the plaintiff is exactly what the defense is supposed to do. But if a motorist actually says "I didn't injure her", then that's an assertion. And judicial estoppel means they may not later claim, for some reason in a later case, that they did do it.
Castle builders