And you've told them so. Yet, when they drop in, you play the good host until they leave. Change your behavior, then they will change theirs. If they welcome company at any time, they may not see why you don't. So, show them.
Most people are creatures of habit.
Thus, if your inlaws drop by usually about supper time, make a point of being gone at that time. But, you don't want to alienate them. So, call them and invite them to have supper with you at a specifed time on a specified day. Before long, you'll have them trained. Always try to accomodate the needs of the other party by offering to do so on your terms and making it difficult or impossible for this to happen on other terms.