Ideas
I am playing on a Mac with mods, and all the packs (except for about half the kits). This has happened to my sim and his imaginary friend several times. At first my sim bought the doll Li'l Monster and turned him into the Friend and all was fine. After traveling to other lots the first time, the IF reset, it reset so that the only options were play, tell secret or put into inventory. I repaired the game, removed caches, and when I loaded them again, the original menu appeared to allow turning the doll into IF again. So I did that. But it's happened 3 times so far that my sim leaving the lot, resets the doll to the original state and the friend is gone from his relationship panel. Relationships are at max each time before it happens. I can make the doll into a friend again and restart the whole process but this obviously undermines the feeling of specialness that we are looking for in an imaginary friend! I haven't really tested this further since my sim is about to age up and I want the option to get them to join household, so I think I won't leave the lot till that happens. But after that I will test this more with different dolls, and seeing if it is because the doll is in the inventory when leaving the lot, playing another household, closing the game, etc.