My old dog went through the same thing - turned out his teeth were bad. Prior to that discovery one thing that worked for keeping his weight up was to cook his food myself. He liked chicken (necks are cheap and the bones aren't dangerous) stewed up with pasta, rice or potatoes, and veg like peas and carrots; mincemeat ditto, with a bit of liver; ox heart and/or tongue also good but a bit gross. Offal is offally cheap, usually.
Important: Don't use onion or garlic! They're toxic for dogs.