This is a great question! And the information on Kingmaking linked above is very useful and on-point. However, You still need an answer, and while I can't provide you with an answer that will be applicable in all situations for all games, I can give you an answer that I have come up with for playing this game with my friends. We also had this problem, and we came up with the following solution, which depends on the situation:
The solution: When the end is guaranteed - end the game.
What does this mean? It means that if the game gets to a situation where A player will win the game, and there is no way to stop him. Simply end the game. This can get hairy, since there are obviously optional rules, tides of battle, and leader cards, but in some cases it can be obvious. Let me now list some of the situations in which we can end the game so that Kingmaking does not become too much of an issue. These are situations that my friends and I have encountered, discussed, or have experience and then reflected on.
Why? We figured there is no reason to elongate a game that is over, especially if there is a clear ending to the game or a clear winner. Yes - we know that there are lots of factors that could potentially change things, but usually these changes are so specific, and require multiple players working together, abandoning their own chances of winning, or suicidal, silly actions just to prevent someone from winning - which goes against the way we like to play games.
1. A player is able to win and nothing and no one can stop him no matter what.
This is the simplest situation. It could be that a player just needs to move a unit into an empty space with a castle to win the game, and that's just it. If the only way to prevent this win is by clearly throwing the game and breaking your position, then just announce the winner.
2. A player claims that he can win on this turn and no on can stop him.
If no other player can dispute this claim and show that there is a way to stop that player from winning that does not "break" the game by requiring any player to play in a way that is obviously counter to their own possibility to win or without throwing the game, then the claiming player wins. However, if there are still actions that can be done to prevent this, the game continues "as normal" until another situation which could end the game arises.
3. Two Players both claim that they can win the game on this turn unless the other one wins first.
If one of the two players has a timing advantage, such that they could clearly win before the other one, (ie: it is basically a race with one player having an advantage) then you need to analyze the situation. If a player has to sacrifice their chance to win the game, or make a move that is against the games objective (purposefully abandoning a castle, or sacrificing troops) just to prevent this, then the player with the timing advantage should win. If there is indeed a way to prevent this without throwing the game, game continues as normal.
If there is no clear advantage to one player over the other, game simply carries on as normal - and in this situation Kingmaking still remains a problem.
These situations can help reduce the problem of end-game kingmaking, but as you can see, it can be tricky to apply. Use at your own discretion, and probably discuss this with players before implementing it.
By removing the opportunity of a player to throw the game out of spite, or to make moves that are against the objective of the game you can limit the kingmaking