I would check the voltage drop when starting, put voltmeter leads on battery posts and note voltage when cranking.
If voltage during cranking is too low, bike may not be able to create spark even tho it is cranking.
( starter is taking all the battery resources)
Heat is bad for batteries, being your problem seems to come when bike is hot, the battery may be sucking up heat
and this is adding to the problem.
Easy check.
my .02¢