This is misunderstanding how Russia works - Russia is not a military dictatorship, it's a security services dictatorship.
The Military in Russia is a low-status organisation and it is not capable of doing anyrhing in internal politics. They commonly end up on the recieving end of racketeering by low-level gangs. Yes, people that drive tanks and fire missiles pay 'taxes' to bandits armed with pistols.
Putin was sending generals to their deaths without worry.
Various internal police forces have a higher chance of removing FSB from power than the military does. If thongs get bad enough, thats not impossible.