This is one of those fictional tropes you see every so often, the idea that the rightful leader of the country (King, Ruler, President etc.) has a strong support of his nations military, so the bad guy who’s second-in-command or a high enough General, decides to send most of the armies loyal to the leader conveniently out of the country so that he can launch his own coup conveniently without having to deal with any opposition.
Things something like that happened in Athens, because the assembly of citizens could vote on almost anything - but you couldn’t vote if you were not physically there. Therefore, for example, Alcibiades was accused of crimes while he and the fleet were on the way to Sicily; he refused to return for trial, partially because the fleet (which had many of his supporters) wouldn’t be available to vote on his behalf while they were deployed.
This is what happened to Richard the Lionheart when he left on crusade. His brother John attempted to overthrow the person Richard had designated to be in charge. Of course he did eventually become king anyway after Richard died.
There’s a reason he’s portrayed as the main villain in most of the Robin Hood movies.
Not necessarily what you’re looking for, but Benedict Arnold’s plan to surrender West Point to the British involved deliberately weakening its defenses and sending most of the troops under his command away from the fort itself so that it would be easy pickings for a British seige.
Fairly common in the Roman empire, especially since they had eastern and western emperors and at the senior and junior level. When Valentian II died, Eugenius was named western emperor and got loyalty by restoring some aspects of paganism. Theodosius brushed him off and installed his mediocre son, defeating Eugenius. And then there’s multiple times where troops declared one of their own emperor while the emperor was away, though they didn’t intentionally send them away.
Richard II took his troops to attack Ireland, allowing Henry Bolingbroke to travel to England and raise an army. Henry deposed Richard when he returned and became Henry IV.
The history of many nations, like England, involved the King trying to ensure no single noble could amass an army to rival the king’s. I recall reading that, for example, the lords were forbidden to have their own standing armies in their own troop colours. The whole War of the Roses basically reinforced the idea that subordinates with armies were a serious risk.