This first pair of photos is with a 0.1µF capacitor across the primary winding.
| 0.1µF capacitor | |
|---|---|
![]() full cycle | ![]() zoomed |
This second pair of photos is without a capacitor across the primary winding. There's not a perfect coupling between the primary and secondary windings so the primary has some flyback of its own. The flyback is clipping against the maximum rating of the power MOSFET.
| no capacitor | |
|---|---|
![]() full cycle | ![]() zoomed |
In both cases negative voltage is banging against the reverse PN junction of the MOSFET after the discharge. Some MOSFETs aren't well suited for reverse conduction so it's common for a faster diode be connected in parallel.