Filtering uses filter procedure for envelope calculation. Filtering is a standard procedure for calculating envelope used also in other implementations.
Peak detection uses the procedure of detecting peak values in the signal. Peak detection is a procedure which calculates amplitudes more exact than filtering.
Why is Peak detection more precise?
Peak detection method is more exact in amplitude because of filtering method (IIR filter)
always apply a filter and the amplitudes of the actual peaks are reduced.
The peak detection produces a smoother signal in time domain, it only finds the peaks in the signal.
The filtering method applies IIR filter, it makes a signal smoother, and it looks better in FFT domain.