If a magnet came off the shaft it wouldn't work at all in either direction. If the motor does in fact track the location of the window then you have a module attached to the motor. It's most likely lost it's reference point. I'm not familiar with the reset procedure if that's the case. Ford mustangs do exactly what you're describing with their windows (motor/module that tracks the window location and has a "short drop" function when opening and closing the door). The reset procedure for them is to disconnect the power to them while they are operating. Wait a few minutes, reconnect the power and go full up then full down with the door closed. Might work, might not. If you have access to a workshop manual (proper one) check it out, it may be different for yours.