I gave up a long time ago with a dog. After a while, you just sort of accept that you won’t walk them off-property every time they go outside (for their entire life, ha).
I respect it though, my dad makes us take the dog across the street to the woods when we visit. If only a couple days, you can keep a dog off a lawn. But long term never going to happen.