The D&D alignment system was based off virtues. Lying fall under evil, even if you are doing it for a good cause under D&D alignment system.
Lying falls under law. Good and evil is about the intention.
Law/ chaos is deontology, and good/ evil is virtue ethics.
You CAN lie to spare somebodies feelings etc, but essentially you are breaking the unwritten rule of always speaking the truths, which is necessary for society to function.
Think of Kants famous murderer at the door thought experiment.