This sounds like either Vernor Vinge's The Peace War or one of its sequels, The Ungoverned or Marooned in Realtime
Wikipedia summary of The Peace War:
The story takes place in 2048, 51 years after scientists at Lawrence
Livermore National Laboratory develop "the ultimate weapon", a force
field generating device they term a Bobbler. The bureaucracy running
the Laboratory use it to enforce an end to conventional warfare
(triggering a brief war in the process), calling themselves the Peace
Authority. The Bobbler creates a perfectly spherical, impenetrable,
and persistent shield around or through anything, and is used to
contain nuclear weapons, people, and occasionally entire cities or
governments, separating them from the rest of the world (and
presumably killing everyone inside by eventual suffocation and lack of
sunlight).
In an effort to retain their monopoly on this weapon, they make
technological progress illegal, and their power and fear of rebellion
corrupts them. In this world, governments are weak, where they are
permitted at all; the Peace Authority is the true bearer of power and
becomes a worldwide government. A group of rebels, the Tinkers,
develop technology clandestinely far beyond what the Authority has
(while limited to riding horseback and other Authority-mandated
anachronisms), but still has no defense against the bobble. One of the
original inventors of the bobble is part of the resistance, and he
develops a more advanced version of the bobbler which does not require
the huge electrical power sources available only to the Peace
Authority.
It is discovered by the Tinkers (and much later by the Peace
Authority) that the bobbles are actually not force fields, but stasis
fields; within which time has stopped. So not only are the contents
perfectly preserved, but they open spontaneously after a certain time
period. The Tinkers use their knowledge and the Peacers' ignorance of
this effect to their advantage (bobbling themselves for short time
periods, for instance), and with the help of a young thief (and
mathematical genius), they lead a rebellion to try to bobble the power
generators of the Peace Authority and thus neutralize its primary
weapon.