いい匂いのするハンカチで、
何でも姉のするようにした
You can also switch these の to が. It's the way to indicate the theme of the verb in a modifying phrase or clause. を doesn't work for these.
Once seeing 匂いをする and 何でも姉をする don't work, いい匂いをしているハンカチ too much sounds as though the handkerchief is performing a smell, while いい匂いをさせたハンカチ works fine.
I've come to notice that the verb forms ている and した should be being used as adjectives, and it can take the subject and make a non-finite (tiny) clause.
Still, as a caution, when it's with する, いい匂いをするハンカチ sounds as though the hankerchief performs a smell, and 何でも姉をするようにした is a very unusual thing to say and has only the sense of 'perform (a stereotype)' and no sense of 'do as (a particular someone does)'.
I think I can take いい匂いをしているお弁当箱{べんとうばこ} or いい匂いをしているジャスミンの花 all right, but you can always choose to say いい匂いのしているお弁当箱 or いい匂いを漂{ただよ}わせているジャスミンの花.
Not to mention, the expressions like 姉をした and 姉をしている can't be used as an adjectives.
You can say any of these without making much difference in meaning:
いい匂いの[が]しているハンカチ
何でも姉の[が]しているようにした
いい匂いの[が]したハンカチ
何でも姉の[が]したようにした。
Just た starts to assume the sense of the past, I think it's because of の・が. They are no problem, but are better to be used when the sense of the past is needed such as when examining several handkerchieves.