Did you take the wheel back out , shift back and forth and see if it works
without the wheel in, just going in and out?
then, put the wheel back in , put it in a repair stand ,
[or hang from a cord so you can work the drivetrain with the wheel off the ground]
and shift it back and forth while turning the pedals etc..?