«الَّذِي» can remain unchanged while its case position shifts.

Relative Nouns — Ṣilah, ʿĀʾid, Forms and Syntax