the commercial culture of mushrooms is done in sterilized medium - typically horse manure&straw. so the 'dirt&stuff' is highly unlikely to be an issue.
'oh but companies cheat!' - true, however when mushroom companies cheat and don't thoroughly sterilize the growing medium . . .
they lose the whole crop to diseases/<whatevers>
I use varieties of dried mushrooms - simmered/steeped/wrung out for the 'mushroom liquor' - used in gravies/sauces.
not a fan of the mushy rubbery texture of reconstituted dried 'schrooms . . .