The lift providing foil is mounted at the bottom of what is effectively a dagger. The foil and the part of the dagger that's not been lifted out of the water, together with the rudder itself provide enough drag to prevent downwind drift. It's possible that at maximum lift, the foiled dinghies experience a bit more drift but that they make up for this in speed. Some designs may also have a dagger extension below the foil, to further reduce drift.
Most (decent) windsurf boards have daggers too (even retractable ones, like in traditional racing dinghies).
Some catamarans have daggers but others have twin, sharp hulls that provide deceptively much resistance to downwind drag because although they don't penetrate deeply into the water their length combined with that shallow depth provides comparable surface area to a traditional dagger.