It will work with "sudo reboot" . I was facing this issue in VS Code .
When I login using cmd it worked great , groups were giving dialout and docker but since somehow i suspect vs code preserves the session so closing and restart vs code wasn't working. But Sudo reboot will go for fresh connection. Hence it works