Fix broken links on https://www.elastic.co/guide/en/machine-learning/8.19/ml-functions.html and backport changes to the 8.18 and 8.19 branches. More details [here](https://github.com/elastic/docs-content/issues/4023#issuecomment-3559913681).