Its correct because there is no such rule.
"which" tends to be used in non-restrictive clauses, and "that" tends to be used in restrictive clauses. But it is easy to find examples that don't follow this "rule". It is not uncommon to find non-restrictive clauses that use "that" and possible (but less common) to find restrictive clauses using which.
As a learner, you can choose "that" or "which" for restrictive and non-restrictive clauses and you won't be wrong. But be aware that native speakers won't always follow this.
In spoken language, the phrasing and intonation are more important than the choice of pronoun.
So the quoted sentence is correct, but could also be written with "which".