The particles of sludge it loosens will get caught by the filter, down to a certain micron in size, depending on the filter, but the product itself will remain in the oil, and therefore, in the engine, until you drain it. I'm no chemist, but anything that isn't engine oil isn't a lubricant, which is why I won't use flush products or 'cleaners'. I prefer to let high-detergent synthetic oils do the work. IMO, solvents are the opposite of oils, and will break down the components of the oil that are supposed to be protecting the bearings from metal-to-metal contact. I can't recommend flush products at all, and I certainly can't recommend leaving them in longer than prescribed.
That's not how all of that works. Synthetic oils don't contain any more or less detergents than conventional oils. Even if they did, detergents don't clean up sludge and varnish. The role of detergents is to isolate and neutralize acidic contaminants in suspension to prevent them from causing oxidation and corrosion. They exist in engine oils more so to keep the oil clean, not to clean the engine.
Secondly, solvents are what's needed to breakup sludge. They exist in all engine oils in the form of esters or naphthalenes but in usually very low concentrations just as seal conditioners.
Just because an oil has a lot of ester doesn't make it a bad lubricant. Red Line HP series oils are up to 40% ester and have excellent HTHS ratings. High Performance Lubricants HP SAE 30 EF is an ester oil with an HDEO add pack for blending with other oils as a flush with no sacrificing lubrication. Valvoline Premium Blue Restore is ~60% ester serving the same purpose.
I agree with what you say though when referring to the gimmick aftermarket "fix in a bottle" type flushes (Seafoam, MMO, Motor Medic, etc...) that are usually just pale oil with some alcohol tossed in (and maybe a little chlorine). They don't do anything except make your wallet lighter.