I'm saving and reloading a file while I figure this out, so sue me 
I decided to pursue a claim against a rival kingdom for one of my courtiers. After winning the war, I realized he became king of the land independent of me. I was hoping to have him still be my vassal afterwards!
The save file I'm working with is about 3 months before the end of the war. I've tried a few different things, and no matter what, he still becomes an independent ruler of the kingdom after the war:
1) I gave him mayorship of one of my cities
2) I gave him bishopship of one of my bishropics
3) I straight up murdered him (ended war with no gains)
4) I married him to one of my widowed vassals
What do I need to do so that I stay his liege after the war?
I decided to pursue a claim against a rival kingdom for one of my courtiers. After winning the war, I realized he became king of the land independent of me. I was hoping to have him still be my vassal afterwards!
The save file I'm working with is about 3 months before the end of the war. I've tried a few different things, and no matter what, he still becomes an independent ruler of the kingdom after the war:
1) I gave him mayorship of one of my cities
2) I gave him bishopship of one of my bishropics
3) I straight up murdered him (ended war with no gains)
4) I married him to one of my widowed vassals
What do I need to do so that I stay his liege after the war?