When Dr. Strange leaves, so will Carol. It's all a gigantic Sixth Sense homage - Dr. Strange can see Carol, so he thinks she's alive, Carol's ghost hasn't realised she's dead yet so she's hanging around the team, and everyone else just thinks that Dr. Strange is using his magic whenever Carol does something.