sed typically outputs to stdout, but sed -i allows you edit a file “in place”. However, under the hood, it actually creates a new file and then replaces the original file with the new file. This means that sed replaces symlinks with normal files. This is most likely not what you want.
However, there is a flag to pass to make it work the way that you’d expect: