There are physical limitations, you have to figure out if the person you are trying to contain can actually fit in your guard.
If they can but you are struggling then a good tip I've learned is to reduce the space between their belly button and your groin, raise your hips and curl your feet to their butt and this works to give you more control of their hips.
Another good guard maintenance tip is every time they move to do anything, whether they adjust their base or stand a leg up to pass standing, pull them in with your legs. If you feel your control of their hips slipping then doing this can disrupt their base enough for you to readjust.
Hope that helps!