So this has been happening to me quite a bit, I will get 30 minute Dungeon Deserter after completing a Normal RDF, I am also the last to leave, I started waiting till everyone leaves party because I thought that it could be because I leave 1st or 2nd, but I still get it, just wanna know is this normal or just a bug? It has also happened to a few friends who I've grouped up with, 1 of us will sometimes get Dungeon Deserter after fully completing Normal dungeons.
It's a buggy lottery the way you mentioned. Sometimes it works, sometimes not. The system occasionally registers you leaving the dungeon before it registers what bosses, if any, are dead.
Teleport out of the dungeon before leaving group to avoid deserter.