Classic mistake.
If it’s a comparison sentence, it’s ‘I’
“I was not going to the dinner party, unlike Lucy”
In this context, there are two alternatives that are both correct:
“He was attending the same dinner party as I was”
“He was attending the same dinner party as me”
“I was attending the same dinner party as X”
Just ‘I’ at the end is incorrect.