In addition to what the other commenter said, this case took place in California where abortion is fully legal and constitutionally protected. Not to minimize what’s going on in other states of course, but you’re comparing apples to oranges with that statement.
The law allows you to shoot anyone who is trespassing on your property (which is absolutely terrifying). It’s not specific to illegal immigrants and couldn’t be used on someone else’s property. So shooting a rancher on their property would still be illegal.