> the basic version of this experiment, a coherent light source, such as a laser beam, illuminates a plate pierced by two parallel slits, and the light passing through the slits is observed on a screen behind the plate.[5][6] The wave nature of light causes the light waves passing through the two slits to interfere, producing bright and dark bands on the screen – a result that would not be expected if light consisted of classical particles.[5][7] However, the light is always found to be absorbed at the screen at discrete points, as individual particles (not waves); the interference pattern appears via the varying density of these particle hits on the screen.[8] Furthermore, versions of the experiment that include detectors at the slits find that each detected photon passes through one slit (as would a classical particle), and not through both slits (as would a wave).[9][10][11][12][13] However, such experiments demonstrate that particles do not form the interference pattern if one detects which slit they pass through. These results demonstrate the principle of wave–particle duality.[14][15]
This is the part I'm talking about, mainly.
> However, such experiments demonstrate that particles do not form the interference pattern if one detects which slit they pass through.
Once they are measured, you know where they are and they stop acting like a wave.
For instance, consider https://en.wikipedia.org/wiki/Delayed-choice_quantum_eraser which demonstrates that the sensor state has to be part of the superposition instead of causing an irreversible collapse: if you store the detected slit until the photon hits the back wall, then delete it, an interference pattern emerges once again.