Please see Melachim 2 4:1. Redak says that Ovadiah’s wife managed to communicate with him despite him being dead. The dead Ovadiah told her to consult Elisha. Is this not witchcraft like Shaul resurrecting Shmuel? If so, how could Elisha tolerate this?
There are numerous stories of gedolim who spoke to people that already departed this world, such as the Chofetz Chaim, R’ Chaim Volozener, and others. Essentially it is not prohibited to communicate with the dead, the problem is only when it is done in a way that involves witchcraft or sorcery. We should also not look to try to communicate with them, because the medium of doing so might be based in witchcraft, but if someone knows with certainty that it isn’t, I don’t see anything wrong with it..See Sefer Hachinuch Mitzvah 511-515.