I have designed a small 24V to 5.5V 1.5A switched-mode power supply around the Diodes AP63200. If I set my electronic load to between 155 and 165mA, I'm getting strange voltage spikes of around 250mVpp. At 159mA load they line up perfectly with the line frequency (the attached images are even triggered from AC).

Below ~150mA and above ~170mA load it works fine with <60-70mVpp ripple at 5.5V. For the schematic, I've mostly followed the datasheet/evaluation board:
https://www.diodes.com/assets/Datasheets/AP63200-AP63201-AP63203-AP63205.pdfhttps://www.diodes.com/assets/Evaluation-Boards/AP63200WU-EVM-User-Guide-Manual-R1.pdf
I have made two small changes: R10 and D1 are for suppressing large ~40V input voltage spikes at turn-on (maybe from cable inductance?). C17 delays turn-on for 0.5-1s for the same reason. Replacing R10 by a 0 ohm jumper makes no difference. Here is the board:



Things I have tried:
- First I thought it could be a ground loop/ground noise coupling through the probes shield, so I tried various forms of measurement from Dave's video (except the active differential probe which I don't have): single-ended 10x and 1x, two probes and difference function, BNC with 50 Ohm series and 50 Ohm termination. The waveform images were taken with the BNC 50 Ohm setup. But I also noticed that the capacitors create audible noise at exactly the 160 mA range. I disconnected all test gear and still got the noise, so I don't think it is caused by the measurement setup.
- I thought it might have been caused by some oscillation between the SMPS and my active load, so I replaced the active load by a fixed resistor to draw 160mA, same spikey result.
- Then I thought the AC frequency might becoupling into the feedback path somehow, so I lowered the resistor values in the feedback divider by a factor of 100 to 2.7K (R14) and 470 Ohm (R15), same spikes.
- I also tried the suggested feedback capacitor C19 of 100pF from the datasheet, makes no difference.</li><li>I added more (and larger package) input and output capacitors, same result.
What is going on? Is this just a badly designed chip? But I'm still confused that the spikes can be made to line up perfectly with the AC line.
Here are some more pictures. This one is at a smaller load of ~150mA where it works well:

This is at a load that is just a tiny bit smaller, ~157mA. The spikes appear to be much less lined up:

This one is at a larger load of ~170mA, the noise is much better:

Zoomed in on the spikes (top blue curve, taken with difference function):

