Dogs don’t betray.
Huan is a gift to Celegorm from the Valar Orome (“Fear valaros (especially Mayar (Annatar) bearing gifts”). Huan simply continued to serve his true master.
Of course, the moment when Huan leaves Celegorm, and when Tolkien writes that dogs never again accompanied the brothers on a hunt, is a strong moment.
But there is such an aspect:
Juan as a character in a fairy tale is “Helping Animals”, which, as is well known, in the inner world represent the Defense Mechanisms. Defense Mechanisms, even in their most useful form, are automatic responses, always more primitive than a conscious personal response. That is, when Tolkien says that the dogs no longer accompanied him on the hunt, in the language of the analysis of the fairy tale, this means: Celegorm grew up, outgrown his DM, became a mature, conscious person who no longer needed them.
here I write about a possible real historical prototype of Huan: fav.me/dcnbw4u