There's a natural equilibrium between the amount of welfare your state provides and how porous your borders can be. Open borders only make sense with no welfare state, so opening your border will inevitably lead to the collapse of the welfare state.