There are really two different words spelled <that>.
1. A demonstrative adjective/pronoun, which means the opposite of this. Examples:
That isn’t what I said
Who is that man?
This <that> is usually pronounced ðæt, no matter whether it is stressed or unstressed.
2. A complementiser/relative pronoun. Examples:
He told her that he loved her.
“You are the woman that I adore,” he said.
This time the pronunciation is usually ðət. It is possible to find ðæt for this kind of <that> (ho! ho!), but it’s quite rare.