If your floor drain does not have a vent and it is also carrying your washing machine outlet, running the washing machine can siphon the floor drain's trap. Once any trap is not filled with water, it's a direct path to sewer gasses.
But, the WM can develop some nasty smells. You might try running it with no detergent, full hot, with some bleach to see if that helps. Depending on the way it seals things up, sometimes the rubber seals can stay damp for a long time especially if you close the lid after finishing so it can't air dry, and any detergent residue adds organic material along with fibers that support mold growth.
Mildew needs three things:
- the spores themselves (almost impossible to avoid)
- moisture
- food
Break that tripod, and it won't happen. A full hot run might clean out any scum that might be stuck places, and the bleach can help as well.
I leave the door open at least overnight after each WM use to dry things out.
Somebody does make a WM sanitizer product you can add to a (clothes-free) wash cycle that you might try if it isn't a trap issue.
Note also, that the insides of the riser pipe to your WM trap could have some scum on it. A big bottle brush with a long handle might help clean that out. You don't need to go below the trap.
Last I can think of, it's also possible that your WM trap is not vented properly, and something else in the house is siphoning it dry. You can check that with a flashlight if you can look directly down it...you should see some water in the bottom. Same with the floor drain. If either is dry, you need to figure out why, and if you fix that, you'll stop sewer gasses.