Normally because of heals/DoTs, though they usually only last 10-20 seconds so not sure why I stay in combat sometimes for minutes.
Not sure how hard it is to code it... but if you haven't attacked, been attacked or healed/been healed for 10 seconds you are out of combat... should be an easy code anyway majority of other MMOs have this.
i like when i spawn and i cannot use any abilities or weapon swap or use doors lol. have to try numerous things to get my stuff to work again. esc seems to work pretty well to fix this.