Gears shift perfectly when suspended on rack, but not on the ground?
While I'm not sure this qualifies as an answer, because with such questions there is usually a lot of guessing, your issue sounds like a flexing issue or a worn rear-hub. 

The flexing could happen because of your weight (maybe fatigued frame? or just flexible) resulting in slightly changed geometry while riding vs suspended mount.

A worn rear hub could cause a wobbling or light tilting in the cassette while under load.

I would also check the cables while the bike is mounted on the stand and see that the clamps or the bike position (handlebars sitting at a hard angle, pulling on cables) are not somehow affecting the tension in the derailleur cable.