to say a detergent can leave a residue that is sticky, so dirt will stick to it and cause re-soiling is a bit of a quendry, to be 'sticky' a surface needs to have a certain amount of moisture , in most cases something that is dry cannot be sticky ( unless you go into oil based products, but we are talking about water based cleaners) so if we clean a carpet then it dries the minimal amount of detergent left has not only to be in a suffient quantity but also never completely dry.
Let's look at another idea that might be responsible for the idea that detergents cause re-soiling.... The old practice of including optical brighteners in detergents.
So ( years ago) you cleaned a carpet and it looked amazing
, the colours looked bright and the stains had gone, but a couple of weeks later you go back to the house and it looks crap
had it re-soiled? or have the optical brighteners that created the illusion that the carpet looked really clean ceased to work?.
Perhaps this is where the idea of resoiling came from, not from 'sticky residue' but the old use of optical brighteners ( I say 'old use' as I don't think optical brighteners are still added to modern detergents)