What prevents BFS from becoming unstable when pitching from horizontal to vertical? In this video from (SpaceX's BFS landing) there is a point where the ship tilts from horizontal « belly first » terminal velocity freefall, to vertical « engine first » landing position. 



The graph on the right shows that this leads to a vertical acceleration roughly from mach 0.26 to mach 0.31
induced by drag reduction due to tilting manoever itself. 

Gimbaled engines are only fired when the ship is vertical, which could mean this whole tilting manoever is meant to be aerodynamically achieved.

Actuated fins and canard fins are designed to increase or decrease drag about center of gravity of the ship, like a skydiver does by moving its limbs.

But as soon as the ship starts tilting from horizontal to vertical, its body and actuated fins will generate lift. (instead of only drag) 



The ship will start gliding backwards. Lift will increase to a maximum point when fins aren't stalled anymore. 

Question is :

At this point (gliding backwards, almost vertical, mach 0.3, short before suicide burn) the whole ship should become unstable if center of lift is between center of gravity and aft part of the ship (engines) It's a bit like imagining one backward flying VariEze, or the aerobatic figure called "tailslide"  : It will flip over, the same way a  badminton shuttlecock does when it changes direction.

When lift becomes significant, what prevents the ship from naturally tilting back to horizontal or abruptly yaw or roll to some unpreditable new attitude (shuttlecock like)?

I agree if cg is very far back, inward folded aft fins and canard fins could create the correct pitching moment for the BFS to tilt vertical. But where should the cg be for it not to tilt about yaw axis, (or induced roll due to the massive fixed vertical fin) Some airliner trading a vertical stabilizer on its tail for one above its cockpit wont be very stable about yaw axis either.

Note that when looking at animations provided by spaceX, aft fins seem to have only one degree of freedom : The huge hinges allow changes in dihedral.

Canard fins seem to act the same but may have one more (invisible in animation) degree of freedom: variable incidence, which could add control to pitch and roll, but still is useless for yaw control. 

Edit: please focus on yaw axis, consider seconds 1105 to 1107 in animation.
Canard fins don't play any role in stabilizing yaw. How can the aircraft not tumble because of yaw instability and induced roll?
The answer here is to review the history of how Space X "does it" with the Falcon 9.  To solve aerodynamicly, they extend speed brakes from TOP of booster to get it to fall tail first.  CG buffs take note, this is how it works in gravity and atmosphere. Just like a parachute or a hang glider.

Very close observation of the video shows the lower "tail fins" folding inwards, raising the aerodynamic pressure point (in this case drag) above the CG.  The rocket now behaves as an aircraft with its CG way too far back(relative to Clift), pitching up and falling "backwards" towards the ground. Rocket thrust then slows the descent for landing.

The rocket is rotating during this maneuver to its new weight down and drag/lift up configuration, with predictable increase in velocity due to lower net drag towards the direction of "flight".

It may be helpful to draw the "lift" vertical and horizontal components here to understand the forces.
The maneuver is not unlike a 1/4 loop.  It is controlled, because CG is below the Center of drag.

In response to edit regarding yaw axis, great observation!  This is a technique considered for airliners recovering from deep stall!!!  Rock back and forth to bring V stab into play to yaw out of deep stall.

But with the rocket, the gimballed motor will stop this, and before, rudder will now not be used to break the stall, but to preserve it!  This is an aerobatic maneuver, pure and simple.

What Space X does so well is transition the "deep stall" into a controlled landing.

The concern about the V stab is justified.  The Falcon 9 speed brakes are more fool proof.  Let's hope they do not "engineer themselves into a corner" with a potentially flawed design.  

POST EDIT - RESPONSE TO COMMENTS

We need to keep in mind here that the animation is what may be wrong, not the actual flight plan. @qq jkztd correctly pointed out that, if the BFR was falling vertically, with no horizontal motion, the pitch up would cause horizontal motion towards the tail (beginning to glide backwards). Although the pitch up would not induce yaw, the backwards gliding BFR WOULD be unstable in yaw. Folding in horizontal fins would make it stable in pitch. A better solution may be to initiate pitch up with some forward motion, or to simply pitch up by adding more drag to "top" with speed brakes as the Falcon 9 does, or igniting gimballed rocket motor sooner.  However, sometimes, simpler is better,