I've got a bunch of Shindaiwa's.
On one I replaced the box and it turned out to be just a shorted wire. Check the wire from the start switch to make sure it isn't bare and touching metal.
Make sure the plug boot Is secure on the plug also. I've had that cause problems.
I have a B45 that apparently had the wrong box as it would get intermittent spark and die when hot. Replaced the box with the correct one and all is good.
The box is a $50 part so I would start with the wiring, switch and connections.
In 35 years those are the only ignition problems I have encountered.
Hopefully the real mechanics will pitch in.