The scenario where your primary title has title specific succession laws with an unlanded heir not of your dynasty could lead to a core county being stolen when that character takes the de-jure capital of the title. This scenario should be screened.
Another scenario where core titles do not pass to your next character is when your primary title has a title specific succession law and the de-jure title over your capital of the tier lower than your primary is owned by you, but not the first in your list of titles of that tier. If you lose the primary title you will play as your heir who inherits the first title of the lower tier on the list, but the heir who inherits the capital will get the core titles.
The second scenario is most likely a bug in vanilla.
The scenario where your primary title has title specific succession laws with an unlanded heir not of your dynasty could lead to a core county being stolen when that character takes the de-jure capital of the title. This scenario should be screened.
Another scenario where core titles do not pass to your next character is when your primary title has a title specific succession law and the de-jure title over your capital of the tier lower than your primary is owned by you, but not the first in your list of titles of that tier. If you lose the primary title you will play as your heir who inherits the first title of the lower tier on the list, but the heir who inherits the capital will get the core titles.
The second scenario is most likely a bug in vanilla.