Going back to the need for stability: the fewer inputs or adjustments you make, the more stable the bike.
So when you’re going to take a corner, do all the adjustments when the bike is naturally stable. That is, heading in a straight line. Braking, gear changing, shifting your bodyweight - get them all done before you turn.
Taking a corner correctly takes only three things - sometimes, only two. You make one steering input to initiate the turn, setting the bike on its correct line through the corner. Then, as soon as the bike is turned in, you open the throttle a fraction and you keep opening it throughout the turn. This maintains a steady balance of weight between the front and rear wheels, countering the natural tendency for the tyres to scrub off speed. Do not accelerate the bike or you’re heading for a highside.
Finally, as you exit the corner, the bike should be getting more upright. Steady application of throttle alone will do this, if your bike has a tendency to run wide under power. Otherwise, a combination of throttle and a pull on the inside bar (or push on the outside - the effect is the same) will stand the bike upright again.