blind guess you are not standing up far enough out of the saddle..
when climbing the riders mass is over the crank axis, and since the bike is going up hill
slightly forward/above where it would be on the flat floor of a spin class.
some of those stationary bikes tilt upward to replicate the hill slope..
...