its a syntax thing:
“in” signifies the “change in attitude” caused an effect. i.e. “His change in attitude pleased his boss.”
“of” signifies something caused the “change of attitude” i.e. “He had a change of attitude after his boss became angry.”
in modern usage the difference between “in” vs “of” have become lost and are usually accepted as interchangeable in casual conversation.
another use is inclusion vs cause
“He died in grief.” means something other than grief killed him but he was experiencing grief when he died.
“He died of grief.” means his grief killed him.
ok, turning off the evil school Ma’arm