The rhetorical consensus is as you say, lie detectors don’t work and everyone knows it.
The policy consensus, though, is that lie detectors are essential tools that allow interrogators to get whatever results they want from suspects and witnesses. They’re useful, even if they don’t actually detect lies. It’s useful to be able to call someone a liar and back it up.
No one cares how well they work to detect lies if someone “failing” or refusing to take a polygraph test can be used as evidence. No one in a position to ban their use, anyway.