This was caused by the select_id not being flushed to the armature object. This is because the selection code uses `FOREACH_OBJECT_IN_MODE_BEGIN` to iterate over the objects. This doesn't call the depsgraph which would, in normal circumstances, flush the select_id value to the evaluated object. Also fix #136141 Pull Request: https://projects.blender.org/blender/blender/pulls/136320