The SAS module is designed to keep your craft on its current course by means of altering fins and micro-rockets.
You should turn the SAS off while you maneuver your craft onto the desired heading, then turn it back on to have it automatically stay on that heading.
If you find the SAS is not staying on course, you may need to make your craft more maneuverable with the addition of extra fins or micro-rockets.
Ideally, you'll want to avoid these contracts until you get the High-Altitude Flight tech node and the improved jet engine that comes with it. But since when do Kerbals wait for ideal conditions? Here's my example of dealing with the situation.
I started by attaching two LV-909 rocket engines to a regular low-atmosphere plane:
In this save, I don't have custom action groups yet, so I'm using the RCS control to toggle between jet and rocket modes. I also set it to enable the cockpit's reaction wheels to improve control at high altitude, and close air intakes to reduce drag. Only the fuel tanks attached to rockets have any oxidiser in them. Strictly speaking this optimisation is unnecessary, but it can win you a bit of range.
Approximately 12km up the main engines stop providing enough thrust to maintain the climb, so it's time to switch to rocket mode. In my case, it brought me to 20km up at a 45-degree angle, but it is probably not optimal. It may take some practice to hit your target area this way, because you'll be picking up additional horizontal speed, and thus it's possible to under or overshoot.
At this point the plane plummets, but as it goes deeper into the atmosphere, it regains pitch authority, and at 10km it's enough to regain control and turn it around for a safe landing.
Of course, this thing has very limited range, speed and acceleration because of the extra weight. Another problem is jet engines stealing fuel from the rockets' tanks - you may want to pump the fuel manually (requires an R&D centre upgrade) or add some pipes between them. Or try using SRBs instead.
Best Answer
There are a number of issues with VTOL. Biggest one is that the vectoring on engines becomes less and less efficient as the center of thrust is moved higher up towards center of gravity. If center of thrusts ends up above, you actually get engines actively trying to flip the craft over. So first thing is that if there is room at all, move the lifter jets down.
Second issue is that gimballing initiates when you fire a stage. If you just activate the engines via action groups, you get no gimball control. So fire all of your engines in one stage, then shut down these you don't need with action groups. When you re-activate these with action groups, they'll work as supposed to.
Finally, as fuel is used up, center of mass shifts. Your VTOL might start out perfectly balanced and hover steady, and then a few seconds later start turning over. Before you can properly react, the thing is flipping over. You have to make sure that fuel is being used up symmetrically around center of mass. Not an easy task, but that's the only way you'll get a good VTOL.