Why is my gas furnace vibrating when blowing hot air but not when blowing cold air?
The blower very likely does spin at different speeds when heating vs. cooling. This is not uncommon at all. In heating mode they typically are on a low speed, while in cooling or fan mode they are typically on high speed.

As such, it could certainly be the case that there is some imbalance in your blower that excites a harmonic frequency of your furnace at low speed, but when the blower is turning faster at high speed, no sympathetic vibrations are excited; hence vibrations with heat, but not with A/C.

As others have said, it may also be the case that you have an induced draft blower for your gas furnace that is causing the vibration, but these are typically much smaller blowers than the "main" blower.