So I discovered that all 3 plugs to the CDI were not all the way in and I also found this little hole in the soft sealant on the underside.
Hole's in the cdi will be from a diode shorting out, possibly from a bad connection like your terminals What area are you in ?
So an update. Replaced the CDI, checked the sidestand and clutch switches and everything seamed fine. Go back to trying it a few days later and nope its back. So after looking at the wrong models wiring diagram I downloaded the one for my bike and found that the neutral switch and sidestand switch are the only things common to both issues. As I had already checked the sidestand switch I decided to pull the neutral switch. I'm not sure on other bikes bit the Hyo's neutral switch allows the neutral light to earth when its in neutral. The CDI also has a wire running down to the switch but im not sure whether it's ment to earth out too. When I pulled it off it resembled more of a basic proximity switch than an on, off switch. On the selector shaft there is a spring loaded pin that contacts the inside of the switch. The switch has 2 brass contacts on it. 1 in neutral and the other is 5th gear (????) These contacts were super dirty so after cleaning the contacts I'm hoping that this finally solves the problem.