True, but the reason Goodhart's Law and/or the Cobra Effect even come into play is because of a lack of systems thinking / perspective at the functional level. (Badly-designed incentives also matter here).
I have... complex objections to that (fairly popular) position that this margin is too small to elaborate on 😀
So I’ll just put a pin in it to write up publicly sometime. Currently buried in case files.