Accelstepper homing every time?

PaulS:
You do NOT want to change the value of initial_homing until you KNOW that the stepper has stepped.

I don't think the OP is using the variable the way you think.

AFAIK he is just using it as a moving target (the carrot dangling before the donkey) to keep the motor moving one step at a time until it triggers the home switch.

@DrBerk, you seem to take the trouble in setup() to identify the HOME and the OUT limits but your code in loop() makes no use of the OUT limit.

Are you sure your motor is not missing steps when it is following the instructions in loop(). Missing a few steps on each iteration might accumulate to a big position error after a longer period of time.

If the motor is not missing steps then there does not seem to be a programming reason for the problems and I would look for a power supply problem that may, for example, be causing the Arduino to restart.

...R