Yeah, I believe codecogs supports a pretty limited form of basic latex math commands so I wouldn't be surprised if certain features like this don't work here.
There are alternatives to codecogs like MathJax and KaTeX, but I suspect the support will still be pretty basic. We've evaluated MathJax before when we migrated to different software in mid-2018 but found some incompatibilities that affected a lot of old posts so held off on it.