I also experienced the same thing, they say "Unfortunately, the current lending trade system contains a flaw in the returning part, where the Pokemon successfully return but are not recognized by the system, causing the lending to remain in a 'pending condition,' preventing any transfer"
Maybe they're working on it right now,we are just waiting