If lawns are open to the pavement or there are plant pots etc, I walk my dog on the other side away from them. If your dog walks nicely to heel and properly under control, it’s not hard to keep them off other people’s property.
If you have an avid sniffer, it’s worth working on lead work and attention and use those skills on the way to wherever you walk your dog where they are free to sniff and mark, ie park, field etc. When I was walking both my dogs I made sure their attention was on me until we got where we were going.
I hate seeing dogs on extending leads being allowed to wander all over the place instead of being kept under close control. If it’s not acceptable for your dog to wander loose somewhere, the same goes for wandering there whilst still on the lead. I wouldn’t object to a sign at all, because I’d feel the same if it were my lawn. Fwiw, we have a long driveway with wide-ish border between us and our neighbours and are a two minute walk from the main entrance to the local park. The number of people who allow their dogs to both pee on and foul my border is astonishing.
I have had to buy an extending lead for the first time recently, as my old boy is going deaf and can’t hear me to respond to recall. Along pavements I keep it locked at traditional lead length, use both hands for control as I would with a plain lead and he still walks to heel until we get to the park, when he’s allowed to trot about and sniff to his heart’s content.