I think that this line of argument fails in all contexts, not just the context of the state. This same bad line of reasoning is used often in other contexts such as wage labor and the family. It is often argued by some libertarians and conservatives that “you can always just quit your job and get another one”. While this is technically true at face value, it is rendered fairly meaningless when one is on the margin of the labor market and it does not inherently justify whatever any employer does. The fact that I can quit doesn’t necessarily mean that a horrible work environment is okay. Furthermore, there’s a sense in which this sentiment is blatantly false in that we don’t have a free labor market and therefore there is more unemployment and significant barriers to entry to both higher-level jobs and alternatives to wage labor in general. So ultimately the idea that wage laborors are completely free is nonsensical given that the reality of the situation often reduces to a choice between working for a fairly stagnant wage for different cartelized industries.
This bad line of reasoning also can be and is used in the context of the family or close interpersonal relations, sometimes used to justify what either borders on or most definitely is child abuse and spousal abuse. In this context, the sentiment is basically “this is my household, therefore whatever I say goes” and “we created you, therefore you’re obligated to us”. Applying an “if you don’t like it, you can just leave” thing to this doesn’t seem to address the issue. Just because someone is in your household does not mean that you have a right to arbitrarily hit them or confiscate their personal belongings that they take with them. Technically one can leave and very well should leave given such a scenario, but that doesn’t justify any otherwise violent or criminal behavior. Perhaps in some scenarios a child is capable of running away and perhaps they very well should, but it may be risky to run away or attempt to run away given an abusive household and this doesn’t justify the abuse. Likewise, a beaten wife doesn’t consent to her husband’s violence merely for living in the same house as him.
In a sense I’m all for the idea that your home is your castle, but your ownership over your home doesn’t trump other people’s rights to life and liberty, even if they are in your home. While it is generally true that you can do as you will with your own property, this has to be limited to the context of consistantly respecting other people’s liberty, otherwise it will justify any kind of authoritarianism that a given property owner pleases and we’ve merely privatized authoritarianism. People do not lose all of their rights as soon as they enter your justly aquired and maintained property, although they do not have an inherent right to use or take your property. Just because someone is on your land does not make them your defacto slave.