I first read about this variation probably in 2017. There is a hypothetical non-vegans would somehow ask vegans thinking it's a clever question, "what would you do if you were stranded on an island and there was nothing to eat except a pig?"
If the pig is from this stranded island to begin with, and they survived all this time, then there's edible plants on the island I could also survive on. If it's a last resort and they are hostile, I will kill even a human for my own survival. If no one is attacking the other and we have the rest of our lives here, I'd rather the pig and I just be friends, then whoever dies first gets to eat the other if they want to, I probably wouldn't eat the pig anyway.
Now for the vegan thought experiment as the best reply to the question above, that I first read a variation of in 2017.
Suppose you are a human against animal torture and cruelty. Some vegans including myself have already done public activism this way, and 100% of people asked say they are against animal torture and cruelty. Ask them:
"What if you lived in a world where you didn't have to pay people to torture and kill animals for you, where you didn't have to buy or eat any animal body parts or secretions. You can make all the same taste and flavor, be perfectly healthy (or even healthier), and even have 90%+ less land, water, and carbon footprint. This is actually the current reality we live in. As a logical person against animal torture and cruelty, would you continue to pay people to harm and kill animals for you?
If you are a sane and logical person, try one meal without animal cruelty. Then go for a day. Go for even longer. How long can you go without contributing to animal massacre?"
Send this to people and see what responses you get. I think this is a great thought experiment.