I've founded a new kingdom and realised there are still things I want to do before starting a big campaign - I can't for now help claimants or join somebody as mercenary. But i don't see there any "leave kingdom" button nor any other way :(. If I just lose all my fiefs, faction still exists. I'm playing Prophesy of Pendor 3, but I'm not sure if there's any difference.
In the unmodded game, you can still rejoin a different faction or support a claimant in order to end your current faction. However, there isn't a way to return to being unaffiliated. You probably just need to make peace and raise your standing with one faction until they offer you the chance to become a mercenary again.