If the shifting is OK when cold, but notchy when hot, (or vice versa), my thoughts are that it points to the clutch. Clutch plates expand when hot, causing sticking or grabbiness, clutch actuators, (eg pushrods) expand when hot causing early actuation or even slippage. To verify the problem may bethe clutch, when your shifting is notchy, does the bike seem to jump forward when you are stopped with the clutch fully puilled in, and you shift from neutral to first? I am guessing that your clutch is hydraulic, does bleeding help? If is cable operated, does adjusting help when shifting becomes notchy? Can you feel the clutch engaging earlier in relation to how far you release the lever when shifting is notchy?
I suppose heat expansion could also affect dogs and forks, but not likely as all are the same material (usually) and would expand at the same rate, where as clutches and clutch operating materials are made from many different types of metals, alloys, non metallic materials and liquids (oil and hydraulic fluids).