Sounds like the float valve in the carburetor. Either the float level is set too high or the valve simply leaks. Kind of like a leaky faucet at home, it can just drip a little.
When you are riding the engine will consume gas faster than the drip so the float level is correct. At idle the drip can be faster then what the engine uses so the level of gas in the bowl gets too high and the mixture becomes too rich which results in poor idle.
When you shut it off the level gets way too high and drips out the over flow tube.
I suggest that you order up the parts to rebuild the carburetor: gaskets and a new float needle & seat. I would guess the parts would be around $30.
Rod