It's all in the temperature. Allow your pan to get to medium-high or high heat before you add the mushrooms. This will immediately start the cooking process. Some mushroom varieties have a higher water content than others – your ordinary white mushrooms will likely produce more water while cooking than with a shiitake mushroom, for example. So, keep an eye on your pan!