I feel like there's an unwritten "recently" in there. If you were to speak ill of Colonel Sanders, nobody would berate you for speaking ill of the dead. But when a CEO like Wojcicki, who made changes that were unpopular to the end-users (but helped turn YouTube into an actual profitable company) dies, it's considered very impolite to use that opportunity to bad-mouth decisions she made. When her son died earlier this year, that would've been a bad time to speak ill of her, as well, even though she herself was still alive.
A better phrase may be "Don't say things that will hurt the feelings of those who are grieving," but that doesn't roll off the tongue so easily.