„Since the AIM-9L model, which made its debut in the late 1970s, Sidewinders have been “all-aspect" missiles, which means they can pick out the heat of the skin of target against an ambient background instead of just hot exhaust parts of the engine“ [1]
Apparently, against the cold background of the sky, a slightly warmed balloon is visible enough.
[1]: https://www.quora.com/The-Chinese-spy-balloon-was-shot-with-...