Before giving your washing machine or dryer the chance to eat loose socks, reach for your sewing kit and grab some safety pins.
When taking off your socks, simply pin them together, that way they won’t get separated in the wash.
Alternatively, you could try having a separate washing basket or mesh laundry bag just for socks. For the already fallen, keep an odd sock basket in the laundry. The other half will (hopefully) turn up sooner or later.