I have not been able to reproduce this bug since 9.0.1.
So it seems that this addon here is no longer required!! :-)
Making sure that the quest frame closes after accepting the last quest of an NPC.
A bug in the current Blizzard UI prevents this from happening particularly for NPCs offering exactly two quests as can be seen in this video:
This bug of the original Blizzard UI has been discussed here: https://us.forums.blizzard.com/en/wow/t/quest-window-stays-up-after-accepting-quest/408139