When you put the rear wheel back on it may not have seated in the same position as before so that the derailer is behaving normally but the cassette is off track.
If that's not it.
Make sure you are not in the big chain ring up front. You may be cross chaining and the angle is pulling the chain down off the cassette.
If not..
I dunno. But those are some usual issues.