It's not the PNG encoding that causes the loss. The optimisers are literally creating a different image and then losslessly encoding it as PNG.
But it's also a valid point.