We study the behavior of the entropy of the pseudogap Bose-Fermi Kondo model within a dynamical large-$N$ limit, where $N$ is related to the symmetry group of the model. This model is a general quantum impurity model that describes a localized level coupled to a fermionic bath having a density of states that vanishes in a powerlaw fashion near the Fermi energy and to a bosonic bath possessing a powerlaw spectral density below a cutoff energy. As a function of the couplings to the baths various quantum phase transitions can occur. We study how the impurity entropy changes across these zero-temperature transitions and compare our results with predictions based on the g-theorem. This is accomplished by an analysis of the leading and sub-leading scaling behavior. Our analysis shows that the $g$-theorem does not apply to the pseudogap Bose-Fermi Kondo model at the large-N level. This inapplicability originates from an anomalous contribution to the scaling function in the hydrodynamic regime where $k_B T>hbar omega$ which is absent in the quantum coherent regime, i.e., for $k_B T<hbar omega$. We also compare our results with those obtained for the Sachdev-Ye-Kitaev model.