The key point I think you're making is that wars are very rarely even, they are usually a massive group vs whoever dares to challenge them, and most of that group are swing voters who just go along with whoever is winning, which leads to an avalanche effect, if thing end up about even it doesn't last long because whatever side gets a small advantage quickly turns into a huge advantage when all the glory hunters flock to that side. Discouraging that behaviour will make a big difference.
Maybe consider thinking outside the box a bit and go carrot rather than stick, instead of preventing people switching guilds, make it desirable to choose not to, introduce a loyalty bonus related to how long you have been in the same guild. +10% drop rate / exp rate if you've been in same guild for a month, +20% after 6 months, something like that. Not game changing, but enough to make people think twice about switching guilds just to win a war