Flyback 120-240VAC to 3.3VDC ripple and simulation
That is a long shot, but the high ripple voltage you are seeing is because of the electrolytic capacitor \$C_4\$ you picked. According to the its datasheet it has an \$ESR=160m\Omega @ 100kHz\$

The capacitor used in the reference design is a tantalum one, with an equivalent \$ESR=18m\Omega @ 100kHz\$

Although you are switching at a lower frequency (\$\approx 5kHz\$), if you were to linearly interpolate, you could roughly assume the following:

When the MOSFET is turned off, the voltage at the secondary winding raises and begins to charge the output capacitor

Since your current capacitor has a higher ESR, it will be charged a bit more slowly, by a factor of approx:
$$factor\approx\dfrac{1-e^{-1}}{1-e^{-0.1}}=6.64$$

It means that during this period the voltage at the secondary winding will take a bit more time to drop.


This can be roughly checked with a small simulation:
Basically this simulation shows a flyback converter with a fixed frequency regulation. Essentially the gate of the mosfet is turned off whenever the output voltage exceeds \$V_{out}=3.3V\$. The simulation is run for two different \$ESR\$ values, and as you can see the ripple voltage with the bigger \$ESR\$ is approximately 8 times higher.

In order to confirm this suspicion, you can either add more capacitors in parallel at output in order to reduce the equivalent \$ESR\$, or select a tantalum capacitor with very low \$ESR\$.