They help blunt the damage, yes. If you are going to scroll in bed anyway, an amber lens cuts the melatonin-suppressing light coming off your phone, so the sleep hit is smaller. It softens the blow, but it does not cancel the effect out entirely. The light still gets through.
The real fix is not scrolling in bed at all. Glasses reduce the harm, they do not erase it. If you cannot quit the habit yet, stack your defenses: an amber Night lens plus night mode and the dimmest screen setting. Better still, put the phone down.