A couple of suggestions based on my own experience with the SAME issues.
Before you install a new VSS, see if there is one available from a shop or other source. Some guys on other forums have extras from having had to deal with the same issue. Try to hold off buying one new because as with most electrical items there is NO return. If you can get a hold of one, then just unplug the tranny end and the connector under the seat, install the borrowed one and take it for a long ride. If the problem goes away, then you can confirm it as a bad VSS. If the problem persists then you have not spent time and money doing an install (although it's not that difficult).
As I mentioned before, if the problem persists, it may be a broken wire INSIDE the insulation. This is much more common than folks realize. On my bike and on some others, it was one of the VSS wires that runs from the connector under the seat up to the speedo head. Since the break is inside the insulation, it is not visible and requires tracing. Most of the breaks have occured in the large loom that runs along the side of the frame between the front of the gas tank and the steering stem. For some reason that area is susceptible to bends and vibration which leads to the wires breaking.
Another quick way to test it is to ride it under safe conditions, and then with a free hand reach over and shake the harness as the bike is moving. That's usually all it takes to interrupt the signal. Or you can elevate the rear tire and let it run on a stand while shaking the harness.
Good luck and keep us posted.