Minimum reproducible example:
[![Badge](local-blue.svg)](cat.md)
# [![Badge](local-blue.svg)](cat.md)
[![Badge](https://img.shields.io/badge/web-blue)](cat.md)
Reading more result:
The link does not work in the first case. It works in the second case (link defined within a heading).
Third case, external image in internal link, works properly all the time.
Related to: Reading: Embedded Local Images in external markdown links do not work properly