There is reality. If one is to be compassionate, it is in response to reality.
Delusions are separation from reality. It is impossible to practice compassion if one is deluded.
Morality is based on reality. Losing reality is losing the ability to be moral.
I don’t know if he ever said ‘delusion is the root of all evil’. The closest quote I can think of is:
“Beware of someone who lies, for they are capable of anything.”