Very bizarre?
Now, it might sound a bit daft, but can you check the charging voltage across the battery terminals using a multi-meter with the bike at idle and at 3000rpm and then report back.
The reason…
Although your switch appears OK, and works at idle or without the motor running, it may well be suffering from pitted contacts and arcing. What could be happening is that (at higher engine speeds) you’re switching the indicators on and the switch contacts briefly arc leaving enough of a carbon deposit to block the flow of current. Pressing cancel quickly and then re-switching effectively cleans the contact and allows the current to flow.
Why at higher engine speeds? At idle and with the motor not running, or very low engine speeds the electrical system voltage will be around about the 12.5 – 13.0V mark, which could well be low enough not to cause an arc. As soon as the revs rise and the alternator reaches full output voltage (14.0 – 14.4V) it may well develop just enough potential difference to allow an arc to develop when the contacts are initially closed.
Arcing in switches can be caused by a worn switch (contact points worn and too wide), use of silicon based grease/lubricant (which reacts to make silicon carbide which is a very hard non-conductor) or overcharging – hence asking about the charging voltage.
If the charging voltage is within spec, I would still be inclined to point a guilty finger at a worn switch - it's the only "mechanical part" in the system and is the most likely to wear out. As I mentioned it may appear OK, but unless you can inspect the contact point’s condition, you can never be sure and its behaviour will be erratic. Taking it apart and cleaning the contacts with P1000 abrasive could help in the short term, as well as giving it a good dousing in proper contact cleaner (brake cleaner is the same and will do the job). After all, a ten year old indicator switch will have done a LOT of switching in its lifetime!