Failed to know how to apply a stopband over a passband

With the default parameters of raw.filter, you get l_trans_bandwidth and h_trans_bandwidth set to 'auto' which will yield 2 Hz.

Documentation of l_trans_bandwidth:

min(max(l_freq * 0.25, 2), l_freq)

Thus if you change it, it works.
The default for notch_filter is trans_bandwidth=1.

from mne.datasets import sample
from mne.io import read_raw_fif


raw = read_raw_fif(sample.data_path() / "MEG" / "sample" / "sample_audvis_raw.fif")
raw.crop(tmax=30).pick("eeg").load_data()
raw.filter(52, 48, l_trans_bandwidth=1, h_trans_bandwidth=1)
raw.compute_psd().plot()

yields:

Mathieu