My third son Earl Bran of Gwent is an Earl in my kingdom and I married him to the Duchess of Mercia in England. They had a son who is an Ua Briain like myself. However, the message popped up that when Prince Bran dies. Gwent will pass from my kingdom. How does this work? Can I prevent it by making my son a Duke as well?
It works because when you get a higher title it takes precedence and determines your state as vassal/independent and who your liege is. If you make your son a duke it will come down to who dies and makes the grandson a duke first.