As far as I know, it is due to a bug with how Windows handles HH_HELP_CONTEXT context-based lookups.
You can find a technical explanation
here, where it also describes how to get around it - by decompiling the CHM file using the ITStorage COM interface, mapping context ids to topic links, and then using HH_DISPLAY_TOPIC to display the topic instead.
I generally prefer to avoid using barely documented COM interfaces - this one has so few google hits that it might as well not exist. And decompiling a CHM seems a little over-the-top for just opening a help file :-) But I have implemented a minimal version and it seems to work fine on XP through to Windows 11, so I am going to add it to the next beta. It will need to be tested on a variety of CHM files to make sure it's okay.