Not everyone agrees on the “best” way to cook a mushroom, but I think everyone understands that a good mushroom is a concentrated, well browned version of its fresh self. This may inspire you to bathe your ‘shrooms in butter — after all, the milk proteins brown quite beautifully — but the real secret to perfectly browned mushrooms lies in omitting the fat completely, at least until the mushrooms are done cooking.
The culprit behind soggy ‘shrooms is moisture, which leads to a whole lot hand wringing around washing and crowding. Fortunately, washing your mushrooms is fine — they don’t absorb enough water during a quick rinse to make any appreciable difference. Overcrowding the pan can prevent moisture from evaporating quickly though, which results in steamed, rather than seared mushrooms, but mushrooms also get smaller as they cook due to loss of moisture. Keep them in a single layer and you’ll be fine, especially if you resist the urge to add oil or butter when you place your mushrooms in the pan.
For one thing, butter is at least 15% water by volume, and adding it to the pan increases the overall moisture content in that pan, which is what we’re trying to avoid. But even pure fats can create a sort of oil slick on top of the moisture that comes out of the mushrooms, delaying its evaporation.
Direct, dry contact with the pan lets that moisture boil off quickly, browning the mushrooms and creating a concentrated, flavorful result on the bottom of the pan. Once the mushrooms are browned and softened to your liking, you can deglaze all those little browned bits with some wine, then add your fat of choice to bring some richness to the dish.
In terms of technique, I like to keep the heat on the lower side. The higher the heat, the faster your mushrooms will brown (or potentially burn), and you may end up with mushrooms that are raw and bouncy on the inside, but dark brown on the outside. I also like to maximise their flat surface area by slicing the mushrooms, though tearing has its merits.
Clean your ‘shrooms, slice ‘em up, salt them (to help draw out moisture), then place them in a single layer in a pan set over medium or medium-low heat. Let them cook, undisturbed, until they’re well browned on one side, then flip and let the other side get some love. Deglaze the browned bits off the bottom of the pan with a little wine or brandy, add a little butter, and let it all reduce into a savoury, luscious pan sauce.