Hi Paolo !
What aircraft do you use ? Autopilots are very sensitive to correct center of gravity and loads. It can happen at any highly loaded heavy aircrafts, that it cannot maintain absolute correctly the altitude in the very first part of the flight. Some waving is almost "normal" Then, by time, as the fuel decreases and the plane became lighter, autopilot have an easier job, and can maintain the altitude perfectly.
But if it happens all the planes you were trying, then it must be a FS bug, and unfortunately I have to say that "the problem is in your system" and not in the game.