Lol, I had the strangest experience with this. I was about to post a complaint just like yours the other night, but then something amazing happened. Since the latest patch, I keep losing the game because of getting my titles revoked by my Liege Lord...until this last playthrough.
I'm playing ironman with a 1066 start as a count under the Jerusalem "Duke" under the Egyptian Sultanate. I am in the Jerusalem kingdom, not dejure anything with my Liege's Liege Lord. However no matter what I tried (3 restarts), I always ended up becoming a duke and then getting my vassals, duchy title, and or county titles taken away by the Egyptian Sultanate. Here's the crazy account of my 4th attempt, which turned out very different.
I did everything to keep my Liege Lord happy, including switching religion and culture, constantly marrying daughters to him, etc. I only took de jure holdings in a single duchy, nothing else. I managed to fabricate a claim on Damascus, with the goal of getting out of Jerusalem Kingdom and into the Syrian Kingdom for later independence plans. My initial efforts internally peaked when I had the duchy of Ascalon, duchy of Damascus, and was working on collecting the duchy of Syria counties from external lords. I was very close to securing enough de jure land to claim independence and then form the kingdom of Syria when my Liege Lord got hammered by the Byzantine Empire. So I declared independence and easily won my independence war.
Finally, I thought I had found a way to win in Conclave and the new patch. However, shortly after, he declared war on me to reclaim the duchy of Damascus counties. I had plenty of troops and mercs and was winning the war easily. He was retreating, and I was chasing his scattered retreat army. White Peace was an option (I would regret not taking soon after), but then I saw I would gain almost 1000 gold if I won and I needed/wanted the gold. When I caught up to his shrinking army, I was surprise attacked by a MASSIVE merc army he had just raised. I got crushed, lost the war, lost Damascus, then his dukes crushed me again and took Ascalon counties. My once fledgling nation on the verge of a kingdom was reduced to 3 counties trapped between the Byzantine Empire, the Seljuk (Persian) Sultanate, and the Fatimid (Egyptian) Sultanate. I was ready to quit and try again because there was no where to go from there...
But I was still fuming about having all my counties taken away. I still had both duchy titles, they had not been usurped, just the counties were gone. I got the idea that I could try to get my counties back internally. So I swore allegiance to the Egyptian ruler to go back into his kingdom. I took the chance he wouldn't revoke the rest of my titles and end my campaign when I made him my liege. I used my still intact claims to start taking back my counties internally one by one. Then the strangest thing happened.
In previous attempts, I also had problems with decadence, so this time I had been grooming my main heir each generation to be the ultimate spy to deal with decadent relatives. All the rest of my male family members were always trained in the faith to try to keep their decadence in control. Just when I was making progress regaining my counties internally, the world turned upside down, setting off a chain of events I never expected. My intrigue heir died at 26 of pneumonia and I died shortly after. My 2nd son, a Mastermind Theologian, took over. The Egyptian Sultanate had his "install full council power" faction fire and he chose to give up control. Because it's Shia rule and I'm now strangely the vassal with the highest Learning score, I became the new Caliphate!
tldr: Expanded my county holdings internally. Became independent from Egypt. Got crushed by Egypt reclaiming counties. Lost almost everything. Swore allegiance back into my Liege's kingdom. My best heir died, then I died. New heir had very high Learning. Council faction revolted, and installed me as new Caliphate due to highest learning. 100 years of hard work was undone in a single generation, only to have the whole Egyptian Sultanate handed to me through the "wrong" heir.