Blender doesn't support having a child bone as IK target. For example in a parent-to-child chain of bones A, B, and C, you cannot have an IK constraint on bone B that targets bone C.
From Blender's UI it's unclear when a child bone is selected as target. It would be nice if it could disable the constraint and show the field as invalid (in red). The fact that Blender doesn't clearly show this as an error leads to reports like T65257: Very Glitchy Armature.
One thing that could make an implementation not so trivial is speed; going over the entire parent chain of the target bone could be time-consuming.