Anatomy of quantum critical wave functions in dissipative impurity problems