How some corporations miscalculated the impact of abandoning DEI—and what leaders can do differently