Autopilot should disengage at stall warning! That is another significant bug. I think the problem is as follows (I can be wrong as there is many bugs in MSFS):
- When insufficient power is available the autopilot pitches-up in an attempt to maintain whatever vertical mode is active, e.g. vertical speed / pitch / altitude. Only FLCH mode is relatively safe as the autopilot will keep maintaining speed and lowers the nose, nothing wrong here, works the same in real life.
- The autopilot does not disengage at stall warning as it should. As a result, the autopilot gives full nose-up input as the stall occurs and also TRIMS fully nose-up.
- Due to limitations set by the hardware you are using at home you are able to recover without changing or noticing the out of trim condition too much. Engaging the autopilot and letting go of the controls will induce a secondary stall as it takes time for the autopilot to overcome the full nose-up trim and retrim the aircraft.
In real life it would be very hard to push the nose down with a full nose-up trim. But most hardware can’t simulate those stick forces. Your joystick will simulate an out of trim condition differently from real life by having a fixed in-trim-point, in other words the center of the joystick (where it is spring loaded to) is the in-trim position. When out of trim you need to keep pushing or pulling on the stick. When trimming the aircraft you can release the stick back to its spring-loaded center position.
On the real aircraft however the in-trim position is not always the middle of the control column range, you can see it as the center of your joystick itself being moveable and moving back and / or forward depending on trim position. When fully trimmed nose-up in the real aircraft the problem is immediately obvious as the control column itself will be all the way back into your stomach.
Try to recover, re-trim and then re-engage the autopilot, maybe it helps. Or maybe its something completely different, but this is the first thing I could think about.