I think no one caught on to my cryptic but pointed comment earlier, so it's probably time to explain what that means.
6N136 has notoriously poor CMRR.
The problem is the internal wiring, lack of shielding, and base brought out to a whole pin.
Any capacitance to nearby (AC) ground, causes positive feedback into the base.
This includes the LED, or the power MOSFET's drain, etc.
Basically, by biasing it with a pull-up resistor and mild turn-on, you've made a high voltage astable multivibrator.
By changing to a low capacitance, no-base-pin, well shielded device like SFH6345, the symptom will disappear completely.
A keen reader might find the comment perplexing enough to read the datasheets and compare the two devices, and perhaps not find the critical parameters in play here. Indeed, they do not specify any capacitances to the base. The inference is the CMRR test, which while done at a seemingly respectable dV/dt edge rate, is done at a suspiciously low step of only 10V, whereas other optos are done at a much more practical 1000V or thereabouts. (Likely, they chose this because it's simply not enough injected charge to turn the transistor on/off in a logic-level test, and so the dV/dt really doesn't matter much at all. It's one of those specs you need to read with a jaundiced eye and figure why they're telling you what they're telling.)
As for practical solutions, this is not one. Definitely, use a proper power supply circuit, with gate protection, current limiting, and voltage control or whatever it is you need at the output. Nothing worse than slipping a wire, momentarily shorting out your hard work and pfft...BANG, up it smoke it all goes.
Tim