Perhaps you are confused by grammatical discussions of restrictive and nonrestrictive — or essential or nonessential — clauses. (I know I can never keep those terms straight.)
Never mind the nomenclature; when you’re editing your own writing, or someone else’s, simply read the phrase that follows a which (or who) or a that and determine whether the phrase that follows is parenthetical (it can be removed with no change of meaning to the sentence) or it is integral to the sentence. Here are five sample sentences followed by explanation of the problem and a revision.
1. “The inventor of the Etch A Sketch toy that generations of children drew on, shook up, and started over, has died in France, the toy’s maker said.”
The use of that to serve as a grammatical bridge between the name of the product and the phrase describing how it was used implies that more than one type of product called the Etch A Sketch exists; the one that children used as described is, according to this sentence construction, one of two or more types.
When that is replaced with which, and which is preceded by a comma, the sentence structure makes clear that the existence of other Etch A Sketch products is not implied: “The inventor of the Etch A Sketch toy, which generations of children have drawn on and shaken up before starting over, has died in France, the toy’s maker said.” (Note, too, that I have altered the wording explaining how the toy is used and have changed the tense to indicate that the product is extant.)
2. “It was a time when tensions were growing between the black and Jewish communities that had previously been aligned in efforts to affect social change.”
The point of this sentence is not what had occurred between certain communities of black and Jewish people, but what the entire black and Jewish communities had experienced. The restrictive force of that must be replaced by the parenthetical purpose of a comma followed by which: “It was a time when tensions were growing between the black and Jewish communities, which had previously been aligned in efforts to affect social change.”
3. “Police are probing allegations of incidents involving the renowned astrophysicist who is paralyzed.”
The phrase “the renowned astrophysicist who is paralyzed” distractingly refers to the concept of astrophysicists who are not paralyzed. However, “who is paralyzed” is merely additional information appended to the factual statement, and should be attached with a comma followed by who (the equivalent of which): “Police are probing allegations of incidents involving the renowned astrophysicist, who is paralyzed.”
4. “The company’s incident-response team can quickly and reliably identify events, which threaten an organization’s security posture.”
Here and in the example below, the problem in the previous sentence is reversed: This statement implies that all events are threatening. Replacing the comma and which with that corrects that impression by restricting the meaning to refer specifically to threatening events: “The company’s incident-response team can quickly and reliably identify events that threaten an organization’s security posture.”
5. “The court ruled this week that a law passed last summer, which gave five top government-office holders immunity from prosecution, was illegal and must be revoked.”
This sentence construction suggests that the summer, rather than the law, granted immunity. Removal of the bracketing commas and replacement of which with that integrates the central point into the framing sentence: “The court ruled this week that a law passed last summer that gave five top government-office holders immunity from prosecution is illegal and must be revoked.”