Lossless coding tries to find exact repetitions from elsewhere in the picture, lossy doesn't. When there are lots of exact similarities, lossless can be more effective.
Lossless may also be more effective reproducing some pixel graphics images.
There is also a -near_lossless mode in the webp command line tools (cwebp) that often allows for minor loss to be done within the benefits of pixel-based coding. The squoosh app seems to call the near_lossless mode 'Slight loss:', the option appearing when you have already chosen the lossless mode. I recommend using the value 40.