Definitely, this is a serious problem. So, in the name of realism, there should be a chance of having a child only when spouse and sovereign are in the same tile (pubs and theatres would add to this chance, naturally). Of course, we could make it even more Song of Ice and Fire-ish, add a chance of a false heir when your wife is in the same tile as any other male character with charisma greater than yours (charisma needs to be more useful, anyway) - and said child would naturally plot with his mother and real father to have you and your legitimate heirs murdered so he can claim your kingdom. Ah yes, and then your sovereign too can have illegitimate children that later make a claim to the throne and start civil wars against your legitimate children. If we want to be historically accurate, even your legitimate heirs should be making a move to get you off the throne (so to speak) sooner rather than later.
Come to think of it, why do kings have kids anyway? Right, because if they don't have an heir, then people who aren't even related to them will be making claims to the throne - better you have a son and know which direction the assassination plot is coming from, at least.