In-universe it's unclear if we can attest Drogon either a full consciousness of the events or just a magical intuition for what's right. It doesn't exactly matter if his intelligence is more of a conscious, universal or emotional nature. But ultimately what matters is that he realized what was really going on and that the "wheel" is ultimately at fault and needs to be broken. So yes, he doesn't particularly like that his mother is dead, but neither does Jon afterall. But they both realize that it needed to be done.
And I think you can go even further than this. The dragon as this enigmatic and majestic creature is actually necessary for exerting this ultimate act of reason on the world and doing what Dany as a mere mortal is unable to do, not just physically but generally. While the story is primarily a political drama, it was always expected that the more otherwordly factors of Game of Thrones are what ultimately has to call the humans to reason in their useless struggle for power. And in fact, the only major thing I was really disappointed about this last season was the way in which they shoved the White Walker threat out of the way seemingly prematurely, because of the above expectations that they were necessary for "breaking the wheel".
So it was somewhat of a relief to see, if not the Ice, then at least the Fire to rise above the human characters and stand in for what is the only right thing to do, no matter if it did so conciously or merely out of an intuitive feel for universal justice as part of its magical nature.
And in the same way it's notable that this is a level of elevation noone really gave these creatures credit for, not Dany for whom they were her children but also largely weapons, nor Jon who expected Drogon to kill him as much as us viewers, until we all realized that they are ultimately above us and quite simply out of this world.