Is it okay if I'm upset and want to leave with my child every time my in laws drop by unannounced and take over our quality time?
Are you serious? Why do you want to leave?
I have nothing against them personally, but whenever they come over they stay a long time and it is so hard not to say something.
I can understand your feelings about it. It's rude to show up to someone's home unannounced. Maybe your husband can mention how they need to call you and ask first if it is a good time.
That seems like a good idea. It'll allow my child and me to spend time with them when it's right for us.
It's possible that they aren't trying to be rude, they just don't realize how inconvenient it could be for you. Your husband is a good guy if he agrees to talk to them about it. Then things will get better for your relationship with them, and you can enjoy their stay.