A sort answer is that 'that' can replace 'who/which' in defining relative clauses; it cannot replace them in non-defining relatives clauses.
The boy who/that stole the money was expelled.
The film which/that won the Oscar was made by amateurs.
thatstole money from the school office, was expelled.
thatwon the Oscar, was made by amateurs.