Yeah, I found this too. I'll raise a bug report.
The fix for Bug 128317 will be in Blender 4.3.
In the meantime you might be able to workaround with some scripting. Make sure you backup your file first.
Select the object with the Shrinkwrap constraint.
Then in the Python console execute this:
bpy.context.object.constraints["Shrinkwrap"].space_object = bpy.data.objects["SpaceObject"]
If you are referencing bone, you need to do this:
bpy.context.object.constraints["Shrinkwrap"].space_object = bpy.data.objects["SpaceArmature"]
bpy.context.object.constraints["Shrinkwrap"].space_subtarget = "SpaceBone"
Finally if you trying to use the Shinkwrap constraint on a bone, then you will need to specify the bone name:
bpy.context.object.pose.bones["MyBone"].constraints["Shrinkwrap"].space_object = ...
bpy.context.object.pose.bones["MyBone"].constraints["Shrinkwrap"].space_subtarget = ... (if applicable)
To undo the change, set the space_object to None, and the space_subtarget to "". (Or just delete the modifier.)