That v. Which is a constant issue in editing. This article explains the difference. The key though is not to precede either that or which with a comma. The comma indicates a non-restrictive clause. This type of clause should be rare in a formal paper. Typically I delete the comma and maybe you wonder why. The article will help.
Which vs. That: Correct Usage | Merriam-Webster