Many years ago Maurice Walshe made an insightful observation about this. He pointed out that the descriptions of the highest transcendent truth in most religions have a lot in common. They are free of death, free of suffering, and so on. The difference, he suggested, is that those other philosophies also add more things to their concept of the transcendent; and it is those things that the Buddha would not accept.
In the case of the brahmanical non-dual philosophy, yes, they repudiated ahaṁkara, but they also embraced ātman; ahaṁkara is the false, egoistic self, whereas the ātman is the true, immanent, and eternal self that is identical with the cosmos; in Pali, so attā so loko. And that is something that the Buddha would reject as a metaphysical view.