The mushrooms are there because there is old wood and roots that they are breaking down. As long as the organic matter and moisture are present, the mushrooms will return. There is no effective spray or treatment to prevent them from happening; it's a natural decay process. You can rake out mushrooms that appear in the lawn, and perhaps you could put a barrier around the ones on the tree stump. Most dogs leave mushrooms alone, so it's unlikely that they would eat them.