Do you have the same issue if you follow the OP’s steps to reproduce it?
Autopilot is working fine and altitude capture worked great (finally) at 25000 for the entire flight, where it had the tendency to randomly climb while at full speed and low altitude prior to SU12.
Provide extra information to complete the original description of the issue:
If relevant, provide additional screenshots/video: