Mushroom can be here and there all the time. Try to keep lids closed, try to keep your substrate away from outdoor air. Keep your place clean and dry with fresh air circulated. The mushroom we know are that thing above the ground is not the main body of mushroom, but a flowering part of the mushroom, meaning that thing above the ground has the most nutrition. This means nutrition from your substrate is highly concentrated to that thing. Try check your container more often to prevent that to grow any larger. Take it off, spray a tiny bit of rubbing alcohol (like 5-10 alcohol to 90-95 water ratio) lightly on the surface of substrate and keep the lid open for a while (so the alcohol can get away). This solution works okay.